]> git.proxmox.com Git - pve-storage.git/commitdiff
use -e to test if volume exists
authorDietmar Maurer <dietmar@proxmox.com>
Thu, 1 Dec 2011 07:41:33 +0000 (08:41 +0100)
committerDietmar Maurer <dietmar@proxmox.com>
Fri, 2 Dec 2011 09:31:49 +0000 (10:31 +0100)
Because rootdir is a directory, not a file

Makefile
PVE/Storage.pm
changelog.Debian

index ffa8740ebb9b278c06daa9a7a660016c49c54716..9bff9bf8402e4e3286c766ea24f4693e128e9469 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ RELEASE=2.0
 
 VERSION=2.0
 PACKAGE=libpve-storage-perl
-PKGREL=8
+PKGREL=9
 
 DESTDIR=
 PREFIX=/usr
index 304022ddc6293ee0d8429e7a2c1dc7ae779babd4..1b5dc664de300098c2919d92878a764f82aaa643 100755 (executable)
@@ -1271,7 +1271,7 @@ sub vdisk_alloc {
 
            my $path = "$imagedir/$name";
 
-           die "disk image '$path' already exists\n" if -f $path;
+           die "disk image '$path' already exists\n" if -e $path;
 
            run_command("/usr/bin/qemu-img create -f $fmt '$path' ${size}K", 
                        errmsg => "unable to create image");
@@ -1966,7 +1966,7 @@ sub activate_volumes {
 
        # check is volume exists
        if ($scfg->{type} eq 'dir' || $scfg->{type} eq 'nfs') {
-           die "volume '$volid' does not exist\n" if ! -f $path;
+           die "volume '$volid' does not exist\n" if ! -e $path;
        } else {
            die "volume '$volid' does not exist\n" if ! -b $path;
        }
index aba1b42ba269a0a41c837f17d001fc2c36404fdf..ce129094baebf1d0557d2cb741b9d09034a74e41 100644 (file)
@@ -1,3 +1,9 @@
+libpve-storage-perl (2.0-9) unstable; urgency=low
+
+  * use -e (instead of -f) to test if volume exists
+
+ -- Proxmox Support Team <support@proxmox.com>  Fri, 02 Dec 2011 10:31:01 +0100
+
 libpve-storage-perl (2.0-8) unstable; urgency=low
 
   * fix iscsi size bug