From d300e698fe71a5df33905d06fa262cb02802bb0c Mon Sep 17 00:00:00 2001 From: jaden <noreply@example.com> Date: Mon, 26 Jun 2017 18:18:30 +0200 Subject: [PATCH] fix array looping --- gitlab/functions.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gitlab/functions.sh b/gitlab/functions.sh index 0c75c97..b465ad7 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" -- GitLab