[pve-devel] [PATCH storage] Fix #2737: Can't call method "mode"
Thomas Lamprecht
t.lamprecht at proxmox.com
Fri May 15 19:25:01 CEST 2020
On 5/13/20 5:18 PM, Alwin Antreich wrote:
> 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;
>
>
applied, thanks! added parenthesis are not required...
More information about the pve-devel
mailing list