From a7cda5167ded9851f3886e075d0edba79b395828 Mon Sep 17 00:00:00 2001 From: hunbernd Date: Fri, 23 Oct 2020 22:28:35 +0200 Subject: [PATCH] Fix: additional / when combining file paths --- libretroshare/src/ft/ftcontroller.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/libretroshare/src/ft/ftcontroller.cc b/libretroshare/src/ft/ftcontroller.cc index 29494f189..1dc0b1dad 100644 --- a/libretroshare/src/ft/ftcontroller.cc +++ b/libretroshare/src/ft/ftcontroller.cc @@ -735,8 +735,7 @@ bool ftController::completeFile(const RsFileHash& hash) RsDirUtil::splitDirFromFile(fc->mDestination,dst_dir,dst_file) ; // We use this intermediate file in case the destination directory is not available, so as to not keep the partial file name. - - std::string intermediate_file_name = src_dir+'/'+dst_file ; + std::string intermediate_file_name = RsDirUtil::makePath(src_dir, dst_file); // I don't know how the size can be zero, but believe me, this happens, // and it causes an error on linux because then the file may not even exist.