From 3160dbf13910dc8cbf802743a924b9be78d9cd2c Mon Sep 17 00:00:00 2001 From: Wolfgang Link Date: Wed, 13 Jun 2018 13:21:29 +0200 Subject: [PATCH] CIFS: add mkdir option allowing to switch off path creation see commit: c7616abcb278e2b888febc082b557f60676fc376 --- PVE/Storage/CIFSPlugin.pm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/PVE/Storage/CIFSPlugin.pm b/PVE/Storage/CIFSPlugin.pm index ff24c8d..254d3ff 100644 --- a/PVE/Storage/CIFSPlugin.pm +++ b/PVE/Storage/CIFSPlugin.pm @@ -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; -- 2.39.2