From fe91eaabe313f711259652ccd137fed8d2be8a54 Mon Sep 17 00:00:00 2001 From: Chee Yee Date: Tue, 14 Feb 2023 00:14:22 -0800 Subject: [PATCH] fix copy of single file with webdav --- source/actions.cpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/source/actions.cpp b/source/actions.cpp index 6d4d630..6aca8ba 100644 --- a/source/actions.cpp +++ b/source/actions.cpp @@ -1573,10 +1573,16 @@ namespace Actions sprintf(status_message, "%s", lang_strings[STR_CANT_COPY_TO_SUBDIR_MSG]); continue; } + int res = CopyRemotePath(*it, new_path); + if (res == 0) + sprintf(status_message, "%s - %s", it->name, lang_strings[STR_FAIL_COPY_MSG]); + } + else + { + int res = CopyRemotePath(*it, remote_directory); + if (res == 0) + sprintf(status_message, "%s - %s", it->name, lang_strings[STR_FAIL_COPY_MSG]); } - int res = CopyRemotePath(*it, new_path); - if (res == 0) - sprintf(status_message, "%s - %s", it->name, lang_strings[STR_FAIL_COPY_MSG]); } activity_inprogess = false; file_transfering = false;