Fixed MakeAlias to give better errors, and to work.

This commit is contained in:
sfraser 1998-05-27 21:14:11 +00:00
Родитель 9f92c9787d
Коммит 28bc034a21
1 изменённых файлов: 4 добавлений и 4 удалений

Просмотреть файл

@ -198,7 +198,7 @@ END_OF_APPLESCRIPT
}
}
sub MakeAlias($$)
sub MakeAlias($;$)
{
my ($old_file, $new_file) = @_;
@ -214,10 +214,10 @@ sub MakeAlias($$)
$new_file .= $1;
}
die "Can't make an alias for \"$old_file\"; it doesn't exist.\n" unless -e $old_file;
die "Can't make an alias \"$new_file\" for \"$old_file\"; it doesn't exist.\n" unless -e $old_file;
unlink $new_file;
symlink($old_file, $new_file) || die "Can't make an alias for \"$old_file\"; unknown error.\n";
symlink($old_file, $new_file) || die "Can't make an alias \"$new_file\" for \"$old_file\"; unknown error.\n";
}
1;
1;