Code

import-tars: be nice to wrong directory modes
authorJohannes Schindelin <Johannes.Schindelin@gmx.de>
Sat, 28 Apr 2007 23:59:47 +0000 (01:59 +0200)
committerShawn O. Pearce <spearce@spearce.org>
Sun, 29 Apr 2007 00:01:36 +0000 (20:01 -0400)
Some tars seem to have modes 0755 for directories, not 01000755. Do
not generate an empty object for them, but ignore them.

Noticed by riddochc on IRC.

Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Signed-off-by: Shawn O. Pearce <spearce@spearce.org>
contrib/fast-import/import-tars.perl

index 5585a8b2c575f92e6154e03641b467e5e54509f4..e84647770abbac3090bd92d256edf23565a0bae6 100755 (executable)
@@ -52,6 +52,7 @@ foreach my $tar_file (@ARGV)
                        Z8 Z1 Z100 Z6
                        Z2 Z32 Z32 Z8 Z8 Z*', $_;
                last unless $name;
+               next if $name =~ '/$';
                $mode = oct $mode;
                $size = oct $size;
                $mtime = oct $mtime;