followup: code cleanup

Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
Thomas Lamprecht
2019-04-10 10:14:46 +02:00
parent b1f9d99017
commit a2a04139da

View File

@ -307,12 +307,12 @@ __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})[^\/]+$/) {
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);
}
# try to cleanup our backup log file too, if still exisiting, #318
unlink($logpath) if -e $logpath;
}
return undef;