Skip to content

fix: Refactor visitedDirectory handling in MaterializedEnumerationObserver#10011

Merged
Rello merged 4 commits into
masterfrom
bugfix/macvfs-share-visitedDirectory
May 8, 2026
Merged

fix: Refactor visitedDirectory handling in MaterializedEnumerationObserver#10011
Rello merged 4 commits into
masterfrom
bugfix/macvfs-share-visitedDirectory

Conversation

@Rello
Copy link
Copy Markdown
Collaborator

@Rello Rello commented May 8, 2026

visitedDirectory is what keeps a browsed folder in materialisedItemMetadatas() in FilesDatabaseManager.swift (line 591). That list drives checkMaterializedItemsOnServer() in Enumerator.swift (line 423). Preserving visitedDirectory means shared folders gets scanned again when its eTag changes, so the newly added child is discovered and reported.

Test change: update MaterialisedEnumerationObserverTests.swift (line 80) so an evicted directory remains visitedDirectory == true. The existing mixed-state test currently expects the opposite, and that expectation is the bug.

…erver

visitedDirectory is what keeps a browsed folder in materialisedItemMetadatas() in FilesDatabaseManager.swift (line 591). That list drives checkMaterializedItemsOnServer() in Enumerator.swift (line 423). Preserving visitedDirectory means shared folders gets scanned again when its eTag changes, so the newly added child is discovered and reported.

Test change: update MaterialisedEnumerationObserverTests.swift (line 80) so an evicted directory remains visitedDirectory == true. The existing mixed-state test currently expects the opposite, and that expectation is the bug.

Signed-off-by: Rello <Rello@users.noreply.github.com>
@i2h3
Copy link
Copy Markdown
Collaborator

i2h3 commented May 8, 2026

The failing NextcloudFileProviderKit lint action was there before, I had it today, too. I cannot reproduce it locally where SwiftFormat works out fine. Somewhere is just some unnecessary whitespace at some line end. You can ignore that.

Copy link
Copy Markdown
Collaborator

@i2h3 i2h3 left a comment

Choose a reason for hiding this comment

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

Fix the NextcloudFileProviderKit tests first, please, though. 😄

@i2h3 i2h3 added bug os: 🍎 macOS Apple macOS, formerly also known as OS X feature: 📁 file provider macOS File Provider Extension, more general also known as virtual file system. labels May 8, 2026
@i2h3 i2h3 added this to the 33.0.5 milestone May 8, 2026
@github-project-automation github-project-automation Bot moved this to 🧭 Planning evaluation (don't pick) in 💻 Desktop Clients team May 8, 2026
@i2h3 i2h3 moved this from 🧭 Planning evaluation (don't pick) to 🏗️ In progress in 💻 Desktop Clients team May 8, 2026
@i2h3
Copy link
Copy Markdown
Collaborator

i2h3 commented May 8, 2026

/backport to stable-33.0

Rello added 2 commits May 8, 2026 16:16
Signed-off-by: Rello <Rello@users.noreply.github.com>
@Rello Rello marked this pull request as ready for review May 8, 2026 14:21
@Rello
Copy link
Copy Markdown
Collaborator Author

Rello commented May 8, 2026

wrong keyboard language setting in the last commit message...

Signed-off-by: Rello <Rello@users.noreply.github.com>
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented May 8, 2026

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 8, 2026

Artifact containing the AppImage: nextcloud-appimage-pr-10011.zip

Digest: sha256:ca583bb0d4251135326d6e53b8e9045744cb2004f761be499f72cbe01f12b003

To test this change/fix you can download the above artifact file, unzip it, and run it.

Please make sure to quit your existing Nextcloud app and backup your data.

@Rello Rello merged commit da4b5df into master May 8, 2026
21 of 23 checks passed
@Rello Rello deleted the bugfix/macvfs-share-visitedDirectory branch May 8, 2026 18:06
@github-project-automation github-project-automation Bot moved this from 🏗️ In progress to ☑️ Done in 💻 Desktop Clients team May 8, 2026
@Rello Rello linked an issue May 8, 2026 that may be closed by this pull request
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug feature: 📁 file provider macOS File Provider Extension, more general also known as virtual file system. os: 🍎 macOS Apple macOS, formerly also known as OS X

Projects

None yet

Development

Successfully merging this pull request may close these issues.

File changes in shared folder do not appear locally

2 participants