chiark / gitweb /
Bugfixes.
[ian-dotfiles.git] / process
diff --git a/process b/process
index 513091890610b533e03631bee6c7198d31da57a1..0787d7986f99846f3188219d83d52a43c202a669 100755 (executable)
--- a/process
+++ b/process
@@ -158,11 +158,12 @@ foreach $link (keys %linktargs) {
        defined($rl= readlink $home.$link) or die $!;
     } else {
        die unless $!==&ENOENT;
-       $rl= '';
+       $rl= undef;
     }
     if ($rl ne $targ) {
        would($link, "symlink $targ <-");
        if ($action) {
+           unlink $home.$link if defined $rl;
            symlink $targ,$home.$link or die $!;
        }
     }