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

Remove double slash (try 2)

parent d1287b2a
No related branches found
No related tags found
No related merge requests found
...@@ -263,16 +263,15 @@ dav_upload_folder() { ...@@ -263,16 +263,15 @@ dav_upload_folder() {
# with the server path prefix ('private-upload/docs/test/') # with the server path prefix ('private-upload/docs/test/')
# to make something like '../folder1/folder2/folder-to-upload/test.txt' # to make something like '../folder1/folder2/folder-to-upload/test.txt'
# into 'private-upload/docs/test.txt' # into 'private-upload/docs/test.txt'
local server_path="${fname/$1/$2}" local server_path="${fname/$1/}"
server_path=${server_path%?} #remove double slash by the end
# if its a file... # if its a file...
if [[ -f "${fname}" ]]; then if [[ -f "${fname}" ]]; then
# upload the file ... # upload the file ...
dav_upload "${fname}" "${server_path}" dav_upload "${fname}" "${2}${server_path}"
else else
# if its a dir, create the dir # if its a dir, create the dir
dav_mkdir "${server_path}" dav_mkdir "${2}${server_path}"
fi fi
done done
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment