Fix #2737: Can't call method "mode"

on an undefined value at /usr/share/perl5/PVE/Storage/Plugin.pm line 928

This error message crops up when a file is deleted after getting the
file list and before the loop passed the file entry.

Signed-off-by: Alwin Antreich <a.antreich@proxmox.com>
This commit is contained in:
Alwin Antreich
2020-05-13 17:18:47 +02:00
committed by Thomas Lamprecht
parent 3b74de921e
commit 3d10acf89e

View File

@ -925,7 +925,7 @@ my $get_subdir_files = sub {
my $st = File::stat::stat($fn);
next if S_ISDIR($st->mode);
next if (!$st || S_ISDIR($st->mode));
my $info;