Skip to content

Conversation

@pppanghu77
Copy link

fix: Improve folder name handling in archive path construction

Updated the logic for constructing the archive path to handle long folder names, ensuring they do not exceed system limits. This includes trimming folder names when necessary and improving the overall robustness of the path handling.

Log: Improve folder name handling in archive path construction

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

Added entries for release, obj-x86_64-linux-gnu, and various debian-related files to the .gitignore to prevent unnecessary files from being tracked in the repository.

Log: Update .gitignore to include additional build and release artifacts

Bug: no
Updated the logic for constructing the archive path to handle long folder names, ensuring they do not exceed system limits. This includes trimming folder names when necessary and improving the overall robustness of the path handling.

Log: Improve folder name handling in archive path construction

Bug: https://pms.uniontech.com/bug-view-326399.html
@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

.gitignore 文件

  • .gitignore 文件中新增的路径 release, obj-x86_64-linux-gnu, debian 等路径是否确实不需要被版本控制,需要确认这些文件是否是构建或部署过程中产生的临时文件。
  • .gitignore 文件中的注释 # QtCreator 4.8< compilation database 应该改为 # QtCreator 4.8< compilation database,以保持注释的一致性。

mainwindow.cpp 文件

  • saveConfigWinState 函数中,QVariant tempWidth = m_pSettings->value(MAINWINDOW_WIDTH_NAME);QVariant tempHeight = m_pSettings->value(MAINWINDOW_HEIGHT_NAME); 后面添加了空行,建议保持代码的紧凑性。
  • restoreConfigWinState 函数中,resize(getConfigWinSize());if (savedState == Qt::WindowMaximized) 之间添加了空行,建议保持代码的紧凑性。
  • handleArguments_RightMenu 函数中,处理长文件夹名称的逻辑可以优化,例如使用 QString::left 方法时,可以明确指定截取的长度,而不是使用 FILE_TRUNCATION_LENGTH - strSuffix.length(),这样更清晰。
  • handleArguments_RightMenu 函数中,QRegExp reg("^\s+|[\\:*\"'?<>|\r\n\t]"); 可以使用 QRegularExpression 替代,以支持更强大的正则表达式功能。
  • handleArguments_RightMenu 函数中,strArchivePath += QDir::separator() + compressor;strArchivePath += QDir::separator() + folderName + strSuffix; 之间添加了空行,建议保持代码的紧凑性。

总体来说,代码的改动看起来是为了处理长文件夹名称的问题,并且保持了代码的整洁性。但是,需要确保这些改动不会影响现有的功能,并且已经通过了充分的测试。

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@pppanghu77
Copy link
Author

/merge

@deepin-bot deepin-bot bot merged commit 6a053bd into linuxdeepin:release/eagle Jul 28, 2025
14 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.

3 participants