diff --git a/gitlab/functions.sh b/gitlab/functions.sh
index b465ad7271566e97894b7f3b64ff3aabb550a56d..8c9e462658d8f1a18ddd494bbc68ac12e1e8ecf5 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 -a arr <<< "$1"; echo "$arr"))
+  IFS=/ read -a path_segments <<< "$1"
   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"