diff --git a/cleandir/cleandir.pl b/cleandir/cleandir.pl index a6279eb..26b371b 100755 --- a/cleandir/cleandir.pl +++ b/cleandir/cleandir.pl @@ -97,6 +97,10 @@ sub cleandir { print STDERR "$0:", " " x $level, " checking $dir/$i\n"; } my $st = lstat("$i"); + if (!defined($st)) { + # file has vanished + next; + } my $action = 'i'; # Skip anything on a different filesystem