From 31f177ef0a7463f59a28342032eb8948994ce1a6 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Fri, 28 Mar 2003 16:27:23 +0000 Subject: * Check for collissions. --- src/nix-populate | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/nix-populate') 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 -- cgit 1.4.1