[pve-devel] [PATCH storage] Fix #2737: Can't call method "mode"
Alwin Antreich
a.antreich at proxmox.com
Wed May 13 17:18:47 CEST 2020
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 at proxmox.com>
---
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;
--
2.26.2
More information about the pve-devel
mailing list