Skip to content

Commit 7c42e39

Browse files
Michael J. KiwalaEric Wong
authored andcommitted
git svn: fix empty directory creation
Avoid attempts to stat() the contents of '', which could happen when the root directory is empty. Additionally, remove the unnecessary '_' stat optimization since it was confusing and possibly throwing off the non-existent case. [ew: fixed indentation, rewrote commit message] Acked-by: Eric Wong <[email protected]> Signed-off-by: Michael J. Kiwala <[email protected]>
1 parent bdc4204 commit 7c42e39

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

git-svn.perl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2836,8 +2836,9 @@ sub mkemptydirs {
28362836
foreach my $d (sort keys %empty_dirs) {
28372837
$d = uri_decode($d);
28382838
$d =~ s/$strip//;
2839+
next unless length($d);
28392840
next if -d $d;
2840-
if (-e _) {
2841+
if (-e $d) {
28412842
warn "$d exists but is not a directory\n";
28422843
} else {
28432844
print "creating empty directory: $d\n";

0 commit comments

Comments
 (0)