]> git.proxmox.com Git - pve-storage.git/commitdiff
api: followup style/comment improvements
authorThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 6 Sep 2021 06:32:15 +0000 (08:32 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 6 Sep 2021 06:32:20 +0000 (08:32 +0200)
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 <t.lamprecht@proxmox.com>
PVE/API2/Storage/Status.pm

index cc8ed5ad33b417baa47de2939bb5cff4615e0959..fd82e538c2ce21f06ed57ae534b8da95130f4071 100644 (file)
@@ -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->() };