-
Notifications
You must be signed in to change notification settings - Fork 34
Pr1030 #182
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
Pr1030 #182
Conversation
"mkfs.exfat -V" returns 1 in exfatprogs and 0 in the exfat-utils package. To ensure compatibility with both packages, we only check if "mkfs.exfat" exists. Log: Adapt to exfatprogs Bug: https://pms.uniontech.com/bug-view-338971.html
As title. Log: Update version to 6.0.21
|
TAG Bot TAG: 6.0.21 |
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: wangrong1069 The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideThis PR streamlines ExFat filesystem support by removing unnecessary version checks and debug logs in the create path, and updates the Debian changelog for the new release. Class diagram for updated ExFat filesystem supportclassDiagram
class ExFat {
+getFilesystemSupport() FS
}
class FS {
create
EXTERNAL
}
class Utils {
+findProgramInPath(program: QString): QString
+executCmd(cmd: QString, output: QString, error: QString): int
}
ExFat --> FS
ExFat --> Utils
%% The getFilesystemSupport method in ExFat now sets fs.create to FS::EXTERNAL if mkfs.exfat is found, without version check.
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review我来对这段代码变更进行审查:
潜在问题:
改进建议:
示例改进代码: const QString MIN_EXFAT_VERSION = "1.3.0"; // 定义最低版本要求
if (!Utils::findProgramInPath("mkfs.exfat").isEmpty()) {
if (Utils::executCmd("mkfs.exfat -V", output, error) == 0) {
QString version = extractVersion(output); // 提取版本号的辅助函数
if (compareVersion(version, MIN_EXFAT_VERSION) >= 0) {
qDebug() << "mkfs.exfat found, version" << version << "enabling create support";
fs.create = FS::EXTERNAL;
} else {
qDebug() << "mkfs.exfat version" << version << "is too old, minimum required:" << MIN_EXFAT_VERSION;
}
}
}这样的改进既保证了代码的简洁性,又确保了版本兼容性,同时提供了更好的错误处理和日志记录。 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Summary by Sourcery
Enhancements: