mirror of
git://git.proxmox.com/git/pve-storage.git
synced 2025-01-20 14:03:52 +03:00
file size info: return early if we cannot parse json
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
d4e00f2bd5
commit
339a4eb3c0
@ -833,7 +833,10 @@ sub file_size_info {
|
||||
warn $@ if $@;
|
||||
|
||||
my $info = eval { decode_json($json) };
|
||||
warn "could not parse qemu-img info command output for '$filename'\n" if $@;
|
||||
if (my $err = $@) {
|
||||
warn "could not parse qemu-img info command output for '$filename' - $err\n";
|
||||
return wantarray ? (undef, undef, undef, undef, $st->ctime) : undef;
|
||||
}
|
||||
|
||||
my ($size, $format, $used, $parent) = $info->@{qw(virtual-size format actual-size backing-filename)};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user