]> git.proxmox.com Git - pve-storage.git/commitdiff
CIFS: add mkdir option allowing to switch off path creation
authorWolfgang Link <w.link@proxmox.com>
Wed, 13 Jun 2018 11:21:29 +0000 (13:21 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Thu, 14 Jun 2018 05:49:43 +0000 (07:49 +0200)
see commit: c7616abcb278e2b888febc082b557f60676fc376

PVE/Storage/CIFSPlugin.pm

index ff24c8df16609127376b942870e85dbfe08c99ff..254d3ffe883f36d85c8acb8e046059003a447a31 100644 (file)
@@ -126,6 +126,7 @@ sub options {
        password => { optional => 1},
        domain => { optional => 1},
        smbversion => { optional => 1},
+       mkdir => { optional => 1 },
     };
 }
 
@@ -168,7 +169,7 @@ sub activate_storage {
 
     if (!cifs_is_mounted($server, $share, $path, $cache->{mountdata})) {
 
-       mkpath $path;
+       mkpath $path if !(defined($scfg->{mkdir}) && !$scfg->{mkdir});
 
        die "unable to activate storage '$storeid' - " .
            "directory '$path' does not exist\n" if ! -d $path;