mirror of
https://git.proxmox.com/git/qemu-server
synced 2025-05-21 12:09:40 +00:00
api: create disks: only log cleanup if it's actually done
we cleaned up extracted images, but logged it even for non extracted ones. Only log this when we actually cleaned anything up. Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
This commit is contained in:
parent
dfc47f7da2
commit
5b0f9cc848
@ -492,8 +492,10 @@ my sub create_disks : prototype($$$$$$$$$$$) {
|
|||||||
= $import_from_volid->($storecfg, $source, $dest_info, $vollist);
|
= $import_from_volid->($storecfg, $source, $dest_info, $vollist);
|
||||||
|
|
||||||
# remove extracted volumes after importing
|
# remove extracted volumes after importing
|
||||||
PVE::Storage::vdisk_free($storecfg, $source) if $needs_extraction;
|
if ($needs_extraction) {
|
||||||
print "cleaned up extracted image $source\n";
|
PVE::Storage::vdisk_free($storecfg, $source);
|
||||||
|
print "cleaned up extracted image $source\n";
|
||||||
|
}
|
||||||
@$vollist = grep { $_ ne $source } @$vollist;
|
@$vollist = grep { $_ ne $source } @$vollist;
|
||||||
};
|
};
|
||||||
die "cannot import from '$source' - $@" if $@;
|
die "cannot import from '$source' - $@" if $@;
|
||||||
|
Loading…
Reference in New Issue
Block a user