From 574338319e666fa3dcf8859cbd11a2b9972f1e95 Mon Sep 17 00:00:00 2001 From: "Peter J. Holzer" Date: Tue, 20 Apr 2021 09:16:49 +0200 Subject: [PATCH] Fix handling of directory with x but no r permission --- cleandir/cleandir.pl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cleandir/cleandir.pl b/cleandir/cleandir.pl index 26b371b..ec250a6 100755 --- a/cleandir/cleandir.pl +++ b/cleandir/cleandir.pl @@ -85,8 +85,8 @@ sub cleandir { print STDERR "$0:", " " x $level, " cleandir $dir $since {\n"; } if (!opendir(DIR, ".")) { - printf STDERR "$0:", " " x $level, " cannot opendir $dir: $!"; - return; + print STDERR "$0:", " " x $level, " cannot opendir $dir: $!\n"; + return 0; } my $std = lstat("."); my $fs = $std->dev;