forked from lix-project/lix
* Check for collissions.
This commit is contained in:
parent
278ea4097e
commit
31f177ef0a
|
@ -40,6 +40,9 @@ sub createLinks {
|
||||||
}
|
}
|
||||||
-d $dstfile or die "$dstfile is not a directory";
|
-d $dstfile or die "$dstfile is not a directory";
|
||||||
createLinks($srcfile, $dstfile);
|
createLinks($srcfile, $dstfile);
|
||||||
|
} elsif (-l $dstfile) {
|
||||||
|
my $target = readlink($dstfile);
|
||||||
|
die "collission between $srcfile and $target";
|
||||||
} else {
|
} else {
|
||||||
print "linking $dstfile to $srcfile\n";
|
print "linking $dstfile to $srcfile\n";
|
||||||
symlink($srcfile, $dstfile) or
|
symlink($srcfile, $dstfile) or
|
||||||
|
|
Loading…
Reference in a new issue