about summary refs log tree commit diff
path: root/src/nix-populate
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2003-03-28T16·27+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2003-03-28T16·27+0000
commit31f177ef0a7463f59a28342032eb8948994ce1a6 (patch)
tree7aea77bf2917ec7ef8465c81d6d42994be7c66bd /src/nix-populate
parent278ea4097e4deca33da1a08d746e8d80a620ce95 (diff)
* Check for collissions.
Diffstat (limited to 'src/nix-populate')
-rwxr-xr-xsrc/nix-populate3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/nix-populate b/src/nix-populate
index 294ded893ce0..fa70ace80674 100755
--- a/src/nix-populate
+++ b/src/nix-populate
@@ -40,6 +40,9 @@ sub createLinks {
 	    }
 	    -d $dstfile or die "$dstfile is not a directory";
 	    createLinks($srcfile, $dstfile);
+	} elsif (-l $dstfile) {
+	    my $target = readlink($dstfile);
+	    die "collission between $srcfile and $target";
 	} else {
 	    print "linking $dstfile to $srcfile\n";
 	    symlink($srcfile, $dstfile) or