Skip to content

Skip enumeration of MS Office/LibreOffice lock files#78

Merged
claucambra merged 2 commits into
mainfrom
bugfix/skip-lock-file-enumeration
May 23, 2025
Merged

Skip enumeration of MS Office/LibreOffice lock files#78
claucambra merged 2 commits into
mainfrom
bugfix/skip-lock-file-enumeration

Conversation

@claucambra
Copy link
Copy Markdown
Contributor

No description provided.

Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
@claucambra claucambra added this to the 2.1 milestone May 23, 2025
@claucambra claucambra requested a review from Copilot May 23, 2025 05:46
@claucambra claucambra self-assigned this May 23, 2025
@claucambra claucambra added the bug Something isn't working label May 23, 2025
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR ensures that MS Office/LibreOffice lock files are not included in file enumerations. The changes introduce a new test case and update metadata handling to filter out lock file items during enumeration.

  • Added testRemoteLockFilesNotEnumerated in EnumeratorTests.swift
  • Updated logging and guard conditions in SendableItemMetadata+Array.swift to skip lock file metadata

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Tests/NextcloudFileProviderKitTests/EnumeratorTests.swift New test case verifying that remote lock files are excluded from enumeration
Sources/NextcloudFileProviderKit/Metadata/SendableItemMetadata+Array.swift Modified logging and guard logic to filter out and warn for lock file metadata
Comments suppressed due to low confidence (1)

Sources/NextcloudFileProviderKit/Metadata/SendableItemMetadata+Array.swift:31

  • [nitpick] Consider adding additional tests to verify that isLockFileName accurately identifies all relevant lock file name patterns for both MS Office and LibreOffice.
guard !isLockFileName(itemMetadata.fileName) else {

Comment thread Tests/NextcloudFileProviderKitTests/EnumeratorTests.swift
@codecov
Copy link
Copy Markdown

codecov Bot commented May 23, 2025

Codecov Report

Attention: Patch coverage is 87.23404% with 6 lines in your changes missing coverage. Please review.

Project coverage is 81.14%. Comparing base (d73df81) to head (045b0d1).
Report is 3 commits behind head on main.

Files with missing lines Patch % Lines
...viderKit/Metadata/SendableItemMetadata+Array.swift 57.14% 6 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #78      +/-   ##
==========================================
+ Coverage   81.08%   81.14%   +0.06%     
==========================================
  Files          62       62              
  Lines       13505    13549      +44     
==========================================
+ Hits        10951    10995      +44     
  Misses       2554     2554              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@claucambra claucambra merged commit fac7cf3 into main May 23, 2025
3 checks passed
@claucambra claucambra deleted the bugfix/skip-lock-file-enumeration branch May 23, 2025 06:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants