summaryrefslogtreecommitdiff
path: root/dh_link
diff options
context:
space:
mode:
authorjoey <joey>2003-08-22 16:47:05 +0000
committerjoey <joey>2003-08-22 16:47:05 +0000
commit5dd373940d0348cc4dce74d0b0aa148d35b29934 (patch)
treec726bed06a08ed41f8876af06997247d251b1d86 /dh_link
parentd1f803bc312f356ac639c06958f5009acf4114d2 (diff)
downloaddebhelper-5dd373940d0348cc4dce74d0b0aa148d35b29934.tar.gz
r1594: * dh_python: Another patch, for pythonX.Y-foo packages.version_4.1.67
* dh_link: Improve error message if link destination is a directory. Closes: #206689
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 8e66d671..7c51d06c 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");
}