зеркало из https://github.com/mozilla/pjs.git
Fixed MakeAlias to give better errors, and to work.
This commit is contained in:
Родитель
9f92c9787d
Коммит
28bc034a21
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче