summaryrefslogtreecommitdiff
path: root/dh_link
diff options
context:
space:
mode:
Diffstat (limited to 'dh_link')
-rwxr-xr-xdh_link5
1 files changed, 4 insertions, 1 deletions
diff --git a/dh_link b/dh_link
index 8e66d67..7c51d06 100755
--- a/dh_link
+++ b/dh_link
@@ -162,7 +162,10 @@ foreach my $package (@{$dh{DOPACKAGES}}) {
# Make sure it's properly absolute.
$src="/$src";
}
-
+
+ if (-d "$tmp/$dest" && ! -l "$tmp/$dest") {
+ error("link destination $tmp/$dest is a directory");
+ }
doit("rm", "-f", "$tmp/$dest");
doit("ln","-sf", $src, "$tmp/$dest");
}