summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog1
-rwxr-xr-xdgit2
2 files changed, 3 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index eeaeb1f..ad43d41 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -7,6 +7,7 @@ dgit (3.12~) unstable; urgency=medium
patch filenames.
* dgit import: Defend against broken symlinks in ..
* dgit import: Right error message for missing files in ..
+ * dgit import: Avoid making broken symlinks in ..
--
diff --git a/dgit b/dgit
index 944de85..dd3b31c 100755
--- a/dgit
+++ b/dgit
@@ -6365,6 +6365,8 @@ END
$there =~ s#/+[^/]+$## or
fail "import $dscfn requires ../$f, but it does not exist";
$there .= "/$f";
+ my $test = $there =~ m{^/} ? $there : "../$there";
+ stat $test or fail "import $dscfn requires $test, but: $!";
symlink $there, $here or fail "symlink $there to $here: $!";
progress "made symlink $here -> $there";
# print STDERR Dumper($fi);