mirror of
https://dev.iopsys.eu/feed/iopsys.git
synced 2025-12-10 07:44:50 +01:00
samba: fix code logic: $path was definetly not empty when checked
Assuming that path and dirpath are both empty, path becomes "/", which is not empty. The -z $path check after was useless. Changed the order of this two operations.
This commit is contained in:
parent
977657eefd
commit
203e252bae
1 changed files with 2 additions and 1 deletions
|
|
@ -124,10 +124,11 @@ smb_add_share() {
|
|||
config_get dir_mask $1 dir_mask
|
||||
config_get browseable $1 browseable
|
||||
config_get dirpath $1 dirpath
|
||||
path="$path/$dirpath"
|
||||
|
||||
[ -z "$name" -o -z "$path" ] && return
|
||||
|
||||
path="$path/$dirpath"
|
||||
|
||||
# restrict the shared paths to always be under /mnt/ tree
|
||||
[ "${path:0:4}" == "/mnt" ] || path="/mnt/"$path
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue