about summary refs log tree commit diff
path: root/scripts/nix-switch
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-04-25T15·20+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-04-25T15·20+0000
commitd6d930a975cf0bfacb8a3117752452b89921b6ee (patch)
tree39c92c90730285fc7dafae7f4d2eff3c55b6be12 /scripts/nix-switch
parentfcc5ae151bb78006e7acc5ab8bf6b54692281777 (diff)
* Bug fix: deleting the old links didn't work properly.
Diffstat (limited to 'scripts/nix-switch')
-rwxr-xr-xscripts/nix-switch4
1 files changed, 2 insertions, 2 deletions
diff --git a/scripts/nix-switch b/scripts/nix-switch
index 8dea3856418b..570f7e9e9227 100755
--- a/scripts/nix-switch
+++ b/scripts/nix-switch
@@ -61,6 +61,6 @@ rename($tmplink, $current) or die "cannot rename $tmplink";
 
 if (!$keep && defined $oldlink) {
     print "deleting old $oldlink\n";
-    unlink $tmplink || print "cannot delete $tmplink";
-    unlink "$tmplink.hash" || print "cannot delete $tmplink.hash";
+    unlink($oldlink) == 1 || print "cannot delete $oldlink\n";
+    unlink("$oldlink.hash") == 1 || print "cannot delete $oldlink.hash\n";
 }