From a2a04139da64147046416dfcfd7cfec941fe730a Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Wed, 10 Apr 2019 10:14:46 +0200 Subject: [PATCH] followup: code cleanup Signed-off-by: Thomas Lamprecht --- PVE/API2/Storage/Content.pm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/PVE/API2/Storage/Content.pm b/PVE/API2/Storage/Content.pm index 4aa9daf..cd4746b 100644 --- a/PVE/API2/Storage/Content.pm +++ b/PVE/API2/Storage/Content.pm @@ -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; -- 2.39.2