diff --git a/gitlab/functions.sh b/gitlab/functions.sh index 0c75c97fb6836c90c943b67ec055d6f4a3b5bac0..b465ad7271566e97894b7f3b64ff3aabb550a56d 100644 --- a/gitlab/functions.sh +++ b/gitlab/functions.sh @@ -238,11 +238,11 @@ dav_recursive_mkdir() { # split path into an array of path segments # uses a subshell so setting the IFS doesnt mess up *this* shell - local path_segments=($(IFS=/ read -r -a arr <<< "$1"; echo "$arr")) + local path_segments=($(IFS=/ read -a arr <<< "$1"; echo "$arr")) local current_subpath='' # loop through segments - for seg in $path_segments; do + for seg in "${path_segments[@]}"; do # append each segment to the current subpath current_subpath="${current_subpath}${seg}/" log_info "mkdir $DOCSERVER/$current_subpath"