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

move dav_mkdir out of subshell to properly capture error

parent fe0097a7
No related branches found
No related tags found
No related merge requests found
......@@ -248,14 +248,9 @@ dav_recursive_mkdir() {
log_info "mkdir $DOCSERVER/$current_subpath"
# make sure the current subpath folder is created
local response
# a 405 exit code is returned when the folder already exists
response=$(dav_mkdir "$DOCSERVER/$current_subpath" 405)
if [[ "${response}" == "405" ]]; then
log_info "Directory ${current_subpath} already exists."
else
log_info "Directory ${current_subpath} did not exist and was created."
fi
dav_mkdir "$DOCSERVER/$current_subpath" 405
log_info "Directory ${current_subpath} (now) exists."
done
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment