From 3d10acf89ee32b7ee2474e10cd0d037b18c1981a Mon Sep 17 00:00:00 2001 From: Alwin Antreich Date: Wed, 13 May 2020 17:18:47 +0200 Subject: [PATCH] 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 --- PVE/Storage/Plugin.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PVE/Storage/Plugin.pm b/PVE/Storage/Plugin.pm index e9da403..cec136e 100644 --- a/PVE/Storage/Plugin.pm +++ b/PVE/Storage/Plugin.pm @@ -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;