]> git.proxmox.com Git - pve-storage.git/commitdiff
file upload: fix race condition
authorDietmar Maurer <dietmar@proxmox.com>
Mon, 4 Mar 2013 08:00:27 +0000 (09:00 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Mon, 4 Mar 2013 08:00:27 +0000 (09:00 +0100)
bump version to 2.3-6

Makefile
PVE/API2/Storage/Status.pm
changelog.Debian

index 3c04f4fe5da1d0732c23ead45e0153e6454958c0..f082d568061a0289d9d2fcefcddaa9b8897c9571 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ RELEASE=2.3
 
 VERSION=2.3
 PACKAGE=libpve-storage-perl
-PKGREL=5
+PKGREL=6
 
 DESTDIR=
 PREFIX=/usr
index fda54bb04e85b32e63f522e068109c553107581c..09222298131aaf1fc05b346f3dd533fa9795f404 100644 (file)
@@ -378,7 +378,14 @@ __PACKAGE__->register_method ({
            print "finished file import successfully\n";
        };
 
-       return $rpcenv->fork_worker('imgcopy', undef, $user, $worker);
+       my $upid = $rpcenv->fork_worker('imgcopy', undef, $user, $worker);
+
+       # apache removes the temporary file on return, so we need
+       # to wait here to make sure the worker process starts and
+       # opens the file before it gets removed.
+       sleep(1);
+
+       return $upid;
    }});
     
 1;
index 2cecccb98e8986518e428c5c35f5f804f3f59643..9993a33c6fd2b5b72b1b7326041b910dc4beeb53 100644 (file)
@@ -1,3 +1,9 @@
+libpve-storage-perl (2.3-6) unstable; urgency=low
+
+  * file upload: fix race condition
+
+ -- Proxmox Support Team <support@proxmox.com>  Mon, 04 Mar 2013 09:00:05 +0100
+
 libpve-storage-perl (2.3-5) unstable; urgency=low
 
   * Allow removal of backup volumes if the user has