diff --git a/dropbox_uploader.sh b/dropbox_uploader.sh index b9926c2..958e56a 100755 --- a/dropbox_uploader.sh +++ b/dropbox_uploader.sh @@ -818,15 +818,15 @@ function db_download #It's a file elif [[ $TYPE == "FILE" ]]; then - + basedir=$(basename "$SRC") #Checking DST if [[ $DST == "" ]]; then - DST=$(basename "$SRC") + DST=$basedir fi #If the destination is a directory, the file will be download into if [[ -d $DST ]]; then - DST="$DST/$SRC" + DST="$DST/$basedir" fi db_download_file "$SRC" "$DST"