Merge branch 'gfi-maint' into gfi-master

* gfi-maint:
  Don't allow empty pathnames in fast-import
  import-tars: be nice to wrong directory modes
This commit is contained in:
Shawn O. Pearce 2007-04-28 20:05:58 -04:00
commit aff787b52b
2 changed files with 3 additions and 0 deletions

View File

@ -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;

View File

@ -1199,6 +1199,8 @@ static int tree_content_set(
n = slash1 - p;
else
n = strlen(p);
if (!n)
die("Empty path component found in input");
for (i = 0; i < t->entry_count; i++) {
e = t->entries[i];