On 4/3/19 12:27 PM, Dominic Jaeger wrote:
Signed-off-by: Dominic Jaeger <d.jae...@proxmox.com>
---
PVE/API2/Storage/Content.pm | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/PVE/API2/Storage/Content.pm b/PVE/API2/Storage/Content.pm
index e941cb6..cbee77d 100644
--- a/PVE/API2/Storage/Content.pm
+++ b/PVE/API2/Storage/Content.pm
@@ -308,6 +308,11 @@ __PACKAGE__->register_method ({
PVE::Storage::vdisk_free ($cfg, $volid);
+ # Delete not only image but also logfile
+ my $logpath = substr $path, 0, index($path, '.');
i don't think this is correct, since index returns the *first* occurence
of the substr, meaning that
'/my/path.with.dots/vzdump....'
leads to the deletion of
'/my/path.log'
+ $logpath = "$logpath.log";
+ unlink($logpath) || die "unlink '$logpath' failed - $!\n";
+
return undef;
}});
_______________________________________________
pve-devel mailing list
pve-devel@pve.proxmox.com
https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel