this is the first step in which not the http server removes the
temporary file, but the worker itself.
Signed-off-by: Lorenz Stechauner <l.stechauner@proxmox.com>
print "command: " . join(' ', @$cmd) . "\n";
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;
+
if (my $err = $@) {
eval { $err_cleanup->() };
warn "$@" if $@;