]> git.proxmox.com Git - qemu-server.git/blobdiff - qmextract
fix bug #617: change command arrangement
[qemu-server.git] / qmextract
index 3b2544564e117e62fac58bea879f6a08edad07d3..d6ee32907d3283afe0cc6488a6f7364abdac7d25 100755 (executable)
--- a/qmextract
+++ b/qmextract
@@ -1,6 +1,7 @@
-#!/usr/bin/perl -w
+#!/usr/bin/perl
 
 use strict;
+use warnings;
 use Getopt::Long;
 use File::Path;
 use IO::File;
@@ -162,7 +163,7 @@ sub extract_archive {
        my $cfg = cfs_read_file('storage.cfg');
        my $scfg = PVE::Storage::storage_config($cfg, $storeid);
 
-       my $alloc_size = ($filesize + 1024 - 1)/1024;
+       my $alloc_size = int(($filesize + 1024 - 1)/1024);
        if ($scfg->{type} eq 'dir' || $scfg->{type} eq 'nfs') {
            # hack: we just alloc a small file (32K) - we overwrite it anyways
            $alloc_size = 32;