Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: correct return value logic in doCopyLocalByRange #2436

Merged
merged 1 commit into from
Nov 28, 2024

Conversation

liyigang1
Copy link
Contributor

  • 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

- 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
@deepin-ci-robot
Copy link

deepin pr auto review

关键摘要:

  • 代码逻辑反转:在doCopyLocalByRange函数中,nextDo != DoCopyFileWorker::NextDo::kDoCopyNext的逻辑被改为nextDo == DoCopyFileWorker::NextDo::kDoCopyNext,这可能会改变函数的行为。需要确认这是否是预期的逻辑更改。

是否建议立即修改:

  • 是,如果逻辑反转不是预期的,那么应该立即修复以避免潜在的错误。如果这是预期的更改,应该添加相应的注释说明为什么需要这样做。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: GongHeng2017, liyigang1, max-lvs

The full list of commands accepted by this bot can be found here.

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@liyigang1
Copy link
Contributor Author

/forcemerge

@deepin-bot deepin-bot bot merged commit c5d6daa into linuxdeepin:release/eagle Nov 28, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants