Skip to content

fix: [computer] avoid updating device size - #1978

Merged
deepin-bot[bot] merged 3 commits into
linuxdeepin:masterfrom
itsXuSt:issue_fix
May 9, 2024
Merged

fix: [computer] avoid updating device size#1978
deepin-bot[bot] merged 3 commits into
linuxdeepin:masterfrom
itsXuSt:issue_fix

Conversation

@itsXuSt

@itsXuSt itsXuSt commented May 9, 2024

Copy link
Copy Markdown
Contributor

if QStorageInfo returns a negative value, ignore this changes, avoid
updating size of device in computer.

Log: as titel.

Bug: https://pms.uniontech.com/bug-view-254235.html

@deepin-bot

deepin-bot Bot commented May 9, 2024

Copy link
Copy Markdown
Contributor

TAG Bot

New tag: 6.0.50
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #1970

@deepin-ci-robot

Copy link
Copy Markdown
Contributor

deepin pr auto review

关键摘要:

  • DeviceWatcherPrivate::queryUsageOfItem函数中,修改了条件判断逻辑,旧的实现如果old不等于newStorage,就会触发查询,而修改后的代码只有在newStorage有效时才触发查询,这是一个合理的逻辑改动。
  • DialogManager::showErrorDialogWhenOperateDeviceFailed函数中,增加了对错误代码的检查,确保只有特定的错误码才会触发消息显示,这是一个security feature。
  • CifsMountHelper构造函数中,添加了空格使得代码更加清晰,这是一个style的改动。
  • convertArgs函数中,对opts参数的检查逻辑可能需要更新,但是修改后的代码似乎尝试将wait_reconnect_timeout的值设置为1,这可能是一个逻辑错误,需要确认新的kTryWaitReconn参数的逻辑和预期行为。

是否建议立即修改:

  • 需要确认kTryWaitReconn参数的逻辑和预期行为,确保错误处理逻辑的正确性。
  • 需要检查CifsMountHelperPrivate构造函数的初始化列表是否需要添加额外的初始化代码,以避免潜在的初始化错误。
  • 建议添加单元测试来验证convertArgs函数的行为,特别是在处理kTryWaitReconn参数时。
  • 建议恢复或增加注释来解释kTryWaitReconn参数的逻辑和期望的行为,以便其他开发者理解。

@deepin-ci-robot

Copy link
Copy Markdown
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: itsXuSt, Johnson-zs

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

Details 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

@itsXuSt

itsXuSt commented May 9, 2024

Copy link
Copy Markdown
Contributor Author

/merge

@deepin-bot
deepin-bot Bot merged commit 04d33a8 into linuxdeepin:master May 9, 2024
@max-lvs

max-lvs commented May 9, 2024

Copy link
Copy Markdown
Contributor

/topic cdapp-240509

@deepin-ci-robot

Copy link
Copy Markdown
Contributor

Add topic: cdapp-240509 successed.

@max-lvs

max-lvs commented May 9, 2024

Copy link
Copy Markdown
Contributor

/integr-topic cdapp-240509

@deepin-ci-robot

Copy link
Copy Markdown
Contributor

Integrated with pr deepin-community/Repository-Integration#1398

@itsXuSt
itsXuSt deleted the issue_fix branch March 13, 2025 07:06
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