Fix handling of directory with x but no r permission

This commit is contained in:
Peter J. Holzer 2021-04-20 09:16:49 +02:00 committed by Peter J. Holzer
parent 4563b0a53a
commit 574338319e
1 changed files with 2 additions and 2 deletions

View File

@ -85,8 +85,8 @@ sub cleandir {
print STDERR "$0:", " " x $level, " cleandir $dir $since {\n"; print STDERR "$0:", " " x $level, " cleandir $dir $since {\n";
} }
if (!opendir(DIR, ".")) { if (!opendir(DIR, ".")) {
printf STDERR "$0:", " " x $level, " cannot opendir $dir: $!"; print STDERR "$0:", " " x $level, " cannot opendir $dir: $!\n";
return; return 0;
} }
my $std = lstat("."); my $std = lstat(".");
my $fs = $std->dev; my $fs = $std->dev;