chiark / gitweb /
dgit import: Defend against broken symlinks in ..
[dgit.git] / dgit
diff --git a/dgit b/dgit
index 51975965deb49aad24c205848e0ca5170983185b..a68bf19c943502d3f039440caa29368ab2a388d9 100755 (executable)
--- a/dgit
+++ b/dgit
@@ -6349,7 +6349,10 @@ END
     foreach my $fi (@dfi) {
        my $f = $fi->{Filename};
        my $here = "../$f";
-       next if lstat $here;
+       if (lstat $here) {
+           next if stat $here;
+           fail "lstat $here works but stat gives $! !";
+       }
        fail "stat $here: $!" unless $! == ENOENT;
        my $there = $dscfn;
        if ($dscfn =~ m#^(?:\./+)?\.\./+#) {