From ac8daace15c85e5c55ccdb863911eaf8864a4d61 Mon Sep 17 00:00:00 2001 From: Andre Anjos <andre.anjos@idiap.ch> Date: Fri, 23 Jun 2017 16:19:11 +0200 Subject: [PATCH] Remove double slash (try 2) --- gitlab/functions.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/gitlab/functions.sh b/gitlab/functions.sh index f02c5c2..faa0646 100644 --- a/gitlab/functions.sh +++ b/gitlab/functions.sh @@ -263,16 +263,15 @@ dav_upload_folder() { # with the server path prefix ('private-upload/docs/test/') # to make something like '../folder1/folder2/folder-to-upload/test.txt' # into 'private-upload/docs/test.txt' - local server_path="${fname/$1/$2}" - server_path=${server_path%?} #remove double slash by the end + local server_path="${fname/$1/}" # if its a file... if [[ -f "${fname}" ]]; then # upload the file ... - dav_upload "${fname}" "${server_path}" + dav_upload "${fname}" "${2}${server_path}" else # if its a dir, create the dir - dav_mkdir "${server_path}" + dav_mkdir "${2}${server_path}" fi done } -- GitLab