Merge pull request #2459 from hunbernd/fix/partialfiles

Fix: additional / when combining file paths
This commit is contained in:
csoler 2021-08-22 21:30:01 +02:00 committed by GitHub
commit 563fc14532
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -735,8 +735,7 @@ bool ftController::completeFile(const RsFileHash& hash)
RsDirUtil::splitDirFromFile(fc->mDestination,dst_dir,dst_file) ; 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. // 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 = RsDirUtil::makePath(src_dir, dst_file);
std::string intermediate_file_name = src_dir+'/'+dst_file ;
// I don't know how the size can be zero, but believe me, this happens, // 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. // and it causes an error on linux because then the file may not even exist.