summaryrefslogtreecommitdiff
path: root/contrib/fast-import/import-tars.perl
diff options
context:
space:
mode:
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>2007-05-16 16:22:26 (GMT)
committerShawn O. Pearce <spearce@spearce.org>2007-05-16 18:54:22 (GMT)
commitdf8cfac815a1fae75afd20a86beb194d9d947971 (patch)
treef3bcc9e026b2dbe4b66e1ce378acb11912ba626b /contrib/fast-import/import-tars.perl
parent52e7b744d365ad4fcbb49fbb2a7b59ddfea90440 (diff)
downloadgit-df8cfac815a1fae75afd20a86beb194d9d947971.zip
git-df8cfac815a1fae75afd20a86beb194d9d947971.tar.gz
git-df8cfac815a1fae75afd20a86beb194d9d947971.tar.bz2
import-tars: Use the "Link indicator" to identify directories
Earlier, we used the mode to determine if a name was associated with a directory. This fails, since some tar programs do not set the mode correctly. However, the link indicator _has_ to be set correctly. Noticed by Chris Riddoch. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de> Acked-by: Junio C Hamano <junkio@cox.net> Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
Diffstat (limited to 'contrib/fast-import/import-tars.perl')
-rwxr-xr-xcontrib/fast-import/import-tars.perl2
1 files changed, 1 insertions, 1 deletions
diff --git a/contrib/fast-import/import-tars.perl b/contrib/fast-import/import-tars.perl
index f0b9a43..5bfd205 100755
--- a/contrib/fast-import/import-tars.perl
+++ b/contrib/fast-import/import-tars.perl
@@ -75,7 +75,7 @@ foreach my $tar_file (@ARGV)
$mode = oct $mode;
$size = oct $size;
$mtime = oct $mtime;
- next if $mode & 0040000;
+ next if $typeflag == 5; # directory
print FI "blob\n", "mark :$next_mark\n", "data $size\n";
while ($size > 0 && read(I, $_, 512) == 512) {