fix: Refactor visitedDirectory handling in MaterializedEnumerationObserver#10011
Conversation
…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>
|
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. |
|
/backport to stable-33.0 |
|
wrong keyboard language setting in the last commit message... |
Signed-off-by: Rello <Rello@users.noreply.github.com>
|
|
Artifact containing the AppImage: nextcloud-appimage-pr-10011.zip Digest: 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. |



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.