this is the first step in which not the http server removes the
temporary file, but the worker itself. for now, this `unlink`
statement won't unlink anything existing. but after changes to
the http server have been made, the endpoint will be able to
clean up for itself afterwards.

Signed-off-by: Lorenz Stechauner <[email protected]>
---
a version bump would be helpful, so the older versions can be
marked as 'breaks' in the pve-http-server repo after the above
mentioned changes.

 PVE/API2/Storage/Status.pm | 1 +
 1 file changed, 1 insertion(+)

diff --git a/PVE/API2/Storage/Status.pm b/PVE/API2/Storage/Status.pm
index 72fd851..9275d1f 100644
--- a/PVE/API2/Storage/Status.pm
+++ b/PVE/API2/Storage/Status.pm
@@ -478,6 +478,7 @@ __PACKAGE__->register_method ({
            print "command: " . join(' ', @$cmd) . "\n";
 
            eval { PVE::Tools::run_command($cmd, errmsg => 'import failed'); };
+           unlink $tmpfilename;
            if (my $err = $@) {
                unlink $dest;
                die $err;
-- 
2.30.2



_______________________________________________
pve-devel mailing list
[email protected]
https://lists.proxmox.com/cgi-bin/mailman/listinfo/pve-devel

Reply via email to