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

support smb mount path with /run prefix #2484

Merged
merged 5 commits into from
Dec 12, 2024

Conversation

Johnson-zs
Copy link
Contributor

No description provided.

@deepin-ci-robot
Copy link

deepin pr auto review

--
2.39.1

Copy link

  • 检测到debian目录文件有变更: debian/control

Copy link

  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "debian/control": [
        {
            "line": "Homepage: http://www.deepin.org",
            "line_number": 68,
            "rule": "S35",
            "reason": "Url link | 6fe814dfb7"
        }
    ]
}

Copy link

  • 检测到debian目录文件有变更: debian/control

Copy link

  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "debian/control": [
        {
            "line": "Homepage: http://www.deepin.org",
            "line_number": 68,
            "rule": "S35",
            "reason": "Url link | 6fe814dfb7"
        }
    ]
}

BREAKING CHANGE: Move all URL protocol related functions from FileUtils and
DeviceUtils into a new ProtocolUtils namespace to avoid code duplication and
improve maintainability.

- Add new ProtocolUtils namespace with unified protocol checking functions
- Rename isGvfsFile to isRemoteFile for better clarity
- Rename isLocalDevice to isLocalFile for consistency
- Remove duplicate implementations from FileUtils and DeviceUtils
- Update all callers to use new ProtocolUtils functions
- Update dependencies and includes across affected files

Log: This change consolidates URL protocol checking logic into a single location,
making the code more maintainable and reducing the risk of inconsistent
implementations.
The smbmounts path can now be either "/media/*/smbmounts/" or
"/run/media/*/smbmounts/". This fixes path matching issues in several
components:

- Update regex in DeviceUtils for SMB file URI parsing
- Update regex in NetworkUtils for CIFS mount point detection
- Update regex in ProtocolUtils for remote file detection
- Update regex in ComputerEventReceiver for CIFS mount crumb parsing
- Update regex in SmbBrowserEventReceiver for CIFS prefix detection

Log: Also unified regex string format using R"()" raw string literals for better
readability and maintainability.

Bug: https://pms.uniontech.com/bug-view-292393.html
Update the regular expression pattern in protocoldisplayutilities.cpp to
support both path formats:
- /media/*/smbmounts/
- /run/media/*/smbmounts/

This change ensures correct handling of SMB paths in both formats when
converting to standard SMB paths.

The regex pattern is updated from:
^file:///media/.*/smbmounts/
to:
^file:///(?:run/)?media/.*/smbmounts/

Log:
Replace deprecated QRegExp with QRegularExpression for better performance
and maintainability. Changes include:

- Update pattern matching in FullTextSearcher for Chinese/English/Number detection
- Update file name filter matching in FileSortWorker
- Update directory filter matching in IteratorSearcher
- Remove unused QRegExpValidator header inclusion
- Convert wildcard patterns to regular expressions using
  QRegularExpression::wildcardToRegularExpression

This change improves performance as QRegularExpression provides a more
efficient implementation based on PCRE2, and removes usage of deprecated
Qt APIs.

Log:
Copy link

  • 检测到debian目录文件有变更: debian/control

Copy link

  • 敏感词检查失败, 检测到1个文件存在敏感词
详情
{
    "debian/control": [
        {
            "line": "Homepage: http://www.deepin.org",
            "line_number": 68,
            "rule": "S35",
            "reason": "Url link | 6fe814dfb7"
        }
    ]
}

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@Johnson-zs
Copy link
Contributor Author

/forcemerge

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Dec 12, 2024

This pr force merged! (status: blocked)

@deepin-bot deepin-bot bot merged commit 5e3f63a into linuxdeepin:master Dec 12, 2024
17 of 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.

3 participants