From d6d930a975cf0bfacb8a3117752452b89921b6ee Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 25 Apr 2003 15:20:05 +0000 Subject: * Bug fix: deleting the old links didn't work properly. --- scripts/nix-switch | 4 ++-- 1 file 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"; } -- cgit 1.4.1