Skip to content
Snippets Groups Projects
Commit d300e698 authored by jaden's avatar jaden
Browse files

fix array looping

parent 61d2d848
No related branches found
No related tags found
No related merge requests found
...@@ -238,11 +238,11 @@ dav_recursive_mkdir() { ...@@ -238,11 +238,11 @@ dav_recursive_mkdir() {
# split path into an array of path segments # split path into an array of path segments
# uses a subshell so setting the IFS doesnt mess up *this* shell # 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='' local current_subpath=''
# loop through segments # loop through segments
for seg in $path_segments; do for seg in "${path_segments[@]}"; do
# append each segment to the current subpath # append each segment to the current subpath
current_subpath="${current_subpath}${seg}/" current_subpath="${current_subpath}${seg}/"
log_info "mkdir $DOCSERVER/$current_subpath" log_info "mkdir $DOCSERVER/$current_subpath"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment