Skip to content
Snippets Groups Projects
Commit 56930c52 authored by André Anjos's avatar André Anjos :speech_balloon:
Browse files

Delete dav folder before recursive upload

parent 5125d40b
No related branches found
No related tags found
1 merge request!63Conda package based CI
...@@ -147,11 +147,12 @@ dav_mkdir() { ...@@ -147,11 +147,12 @@ dav_mkdir() {
if [[ ${code} == *204 || ${code} == *201 ]]; then if [[ ${code} == *204 || ${code} == *201 ]]; then
log_info "curl: mkdir ${DOCSERVER}/${1}" log_info "curl: mkdir ${DOCSERVER}/${1}"
# if the return code was not a success, the function should usually treat it as an error. # if the return code was not a success, the function should usually treat it
# however, sometimes the codes must be treated more flexibly, e.g.: # as an error. however, sometimes the codes must be treated more flexibly,
# dav_recursive_mkdir wants the directory created *or* already existing, # e.g.: dav_recursive_mkdir wants the directory created *or* already
# which means that a 405 (directory already exists) should not be treated as an error. # existing, which means that a 405 (directory already exists) should not be
# other codes may also have similar consideration in the future. # treated as an error. other codes may also have similar consideration in
# the future.
elif [[ "${code}" == "$2" ]]; then elif [[ "${code}" == "$2" ]]; then
return "${code}" return "${code}"
else else
...@@ -221,6 +222,8 @@ dav_upload_folder() { ...@@ -221,6 +222,8 @@ dav_upload_folder() {
exit 1 exit 1
fi fi
dav_delete "${2}"
find "$1" | while read -r fname; do find "$1" | while read -r fname; do
# replace the local path prefix ('../folder1/folder2/folder-to-upload/') # replace the local path prefix ('../folder1/folder2/folder-to-upload/')
# with the server path prefix ('private-upload/docs/test/') # with the server path prefix ('private-upload/docs/test/')
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment