Fix #318: Delete vzdump log when deleting a backup
Vzdump log files were not deleted when a backup was deleted. Consequently, the folder continuously filled with .log files. Now they get deleted after the backup is removed. Signed-off-by: Dominic Jäger <d.jaeger@proxmox.com>
This commit is contained in:
committed by
Thomas Lamprecht
parent
20f1951fb4
commit
b1f9d99017
@ -307,6 +307,13 @@ __PACKAGE__->register_method ({
|
||||
}
|
||||
|
||||
PVE::Storage::vdisk_free ($cfg, $volid);
|
||||
if ($vtype eq 'backup' && $path =~
|
||||
/(.*\/vzdump-\w+-\d+-\d{4}_\d{2}_\d{2}-\d{2}_\d{2}_\d{2})[^\/]+$/) {
|
||||
my $logpath = "$1.log";
|
||||
if (-e $logpath) {
|
||||
unlink($logpath);
|
||||
}
|
||||
}
|
||||
|
||||
return undef;
|
||||
}});
|
||||
|
||||
Reference in New Issue
Block a user