From 0bf785ec0220e8e26565c451239f1e448b4ddf10 Mon Sep 17 00:00:00 2001 From: liyigang Date: Wed, 27 Nov 2024 17:53:41 +0800 Subject: [PATCH] fix: correct return value logic in doCopyLocalByRange - Fix inverted return condition for copy operation success - Return true when NextDo is kDoCopyNext indicating successful copy - Maintain consistent success/failure state with other copy methods This change fixes a logical error where the copy success state was incorrectly inverted, ensuring proper flow control in range-based file copy operations. Log: correct return value logic in doCopyLocalByRange Bug: https://pms.uniontech.com/bug-view-290241.html --- .../fileoperations/fileoperationutils/fileoperatebaseworker.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/common/core/dfmplugin-fileoperations/fileoperations/fileoperationutils/fileoperatebaseworker.cpp b/src/plugins/common/core/dfmplugin-fileoperations/fileoperations/fileoperationutils/fileoperatebaseworker.cpp index eb357fb67f..bc93c702ef 100644 --- a/src/plugins/common/core/dfmplugin-fileoperations/fileoperations/fileoperationutils/fileoperatebaseworker.cpp +++ b/src/plugins/common/core/dfmplugin-fileoperations/fileoperations/fileoperationutils/fileoperatebaseworker.cpp @@ -909,7 +909,7 @@ bool FileOperateBaseWorker::doCopyLocalByRange(const DFileInfoPointer fromInfo, FileUtils::cacheCopyingFileUrl(targetUrl); DoCopyFileWorker::NextDo nextDo = threadCopyWorker[0]->doCopyFileByRange(fromInfo, toInfo, skip); FileUtils::removeCopyingFileUrl(targetUrl); - return nextDo != DoCopyFileWorker::NextDo::kDoCopyNext; + return nextDo == DoCopyFileWorker::NextDo::kDoCopyNext; } bool FileOperateBaseWorker::doCopyOtherFile(const DFileInfoPointer fromInfo, const DFileInfoPointer toInfo, bool *skip)