CIFS: add mkdir option allowing to switch off path creation
see commit: c7616abcb2
This commit is contained in:
committed by
Thomas Lamprecht
parent
bed538e22f
commit
3160dbf139
@ -126,6 +126,7 @@ sub options {
|
|||||||
password => { optional => 1},
|
password => { optional => 1},
|
||||||
domain => { optional => 1},
|
domain => { optional => 1},
|
||||||
smbversion => { optional => 1},
|
smbversion => { optional => 1},
|
||||||
|
mkdir => { optional => 1 },
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -168,7 +169,7 @@ sub activate_storage {
|
|||||||
|
|
||||||
if (!cifs_is_mounted($server, $share, $path, $cache->{mountdata})) {
|
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' - " .
|
die "unable to activate storage '$storeid' - " .
|
||||||
"directory '$path' does not exist\n" if ! -d $path;
|
"directory '$path' does not exist\n" if ! -d $path;
|
||||||
|
|||||||
Reference in New Issue
Block a user