From 3de1c50a898ee78cd54e114580f164158c891a14 Mon Sep 17 00:00:00 2001 From: Thomas Lamprecht Date: Mon, 6 Sep 2021 08:32:15 +0200 Subject: [PATCH] api: followup style/comment improvements try to comment why not what, what is already described good enough by the code here. Also, we want to go up to 100cc text-width if it improves readability, which for post-if's it most often does. Signed-off-by: Thomas Lamprecht --- PVE/API2/Storage/Status.pm | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/PVE/API2/Storage/Status.pm b/PVE/API2/Storage/Status.pm index cc8ed5a..fd82e53 100644 --- a/PVE/API2/Storage/Status.pm +++ b/PVE/API2/Storage/Status.pm @@ -487,10 +487,8 @@ __PACKAGE__->register_method ({ eval { run_command($cmd, errmsg => 'import failed'); }; - # unlinks only the temporary file from the http server - unlink $tmpfilename; - warn "unable to clean up temporary file '$tmpfilename' - $!\n" - if $! && $! != ENOENT; + unlink $tmpfilename; # the temporary file got only uploaded locally, no need to rm remote + warn "unable to clean up temporary file '$tmpfilename' - $!\n" if $! && $! != ENOENT; if (my $err = $@) { eval { $err_cleanup->() };