提交 7c42e390 编写于 作者: M Michael J. Kiwala 提交者: Eric Wong

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: NEric Wong <normalperson@yhbt.net>
Signed-off-by: NMichael J. Kiwala <mkiwala@genome.wustl.edu>
上级 bdc42041
......@@ -2836,8 +2836,9 @@ sub mkemptydirs {
foreach my $d (sort keys %empty_dirs) {
$d = uri_decode($d);
$d =~ s/$strip//;
next unless length($d);
next if -d $d;
if (-e _) {
if (-e $d) {
warn "$d exists but is not a directory\n";
} else {
print "creating empty directory: $d\n";
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册