Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: correct return value logic in doCopyLocalByRange
Browse files Browse the repository at this point in the history
- 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
liyigang1 committed Nov 27, 2024
1 parent e4e917e commit 6e55135
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
@@ -896,7 +896,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)

0 comments on commit 6e55135

Please sign in to comment.