mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-16 14:54:29 +01:00
Merge pull request #4394 from wmertens/patch-6
setup-etc.pl: Fail when symlink/rename fails
This commit is contained in:
commit
d3383e4879
1 changed files with 2 additions and 2 deletions
|
@ -12,8 +12,8 @@ sub atomicSymlink {
|
|||
my ($source, $target) = @_;
|
||||
my $tmp = "$target.tmp";
|
||||
unlink $tmp;
|
||||
symlink $source, $tmp or return 1;
|
||||
rename $tmp, $target or return 1;
|
||||
symlink $source, $tmp or return 0;
|
||||
rename $tmp, $target or return 0;
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue