Skip to content

fix(windows-vfs): apply sync exclusions to on-demand folder listings - #11426

Open
Jac0b-Shi wants to merge 1 commit into
nextcloud:masterfrom
Jac0b-Shi:pr/11414-cfapi-respect-exclusions
Open

Jac0b-Shi wants to merge 1 commit into
nextcloud:masterfrom
Jac0b-Shi:pr/11414-cfapi-respect-exclusions

Conversation

@Jac0b-Shi

@Jac0b-Shi Jac0b-Shi commented Nov 25, 2026 •

Copy link
Copy Markdown

Resolves

Fixes #11414.
Related to #9524.

Summary

Windows on-demand enumeration now applies the sync folder's exclusion rules—including Windows-invalid and reserved filenames (as seen in #9524)—before handing entries to CFAPI, while readable ordinary entries continue to become placeholders.

The tray warning requested in #9524 remains outside the scope of this PR.

Verification

Verified on Windows against upstream master (bad83ce9777529d133897c142e6974256572cdc0; unmodified baseline b981b3daad8ec5ef02ccce67c17b1259f05e9679, with only macOS File Provider changes in between):

  • Unit tests (AccountTest::testAccount_listRemoteFolder): Exposed excluded entries in three rows before the fix and passed all rows afterward. The complete AccountTest target passed.
  • Native CFAPI tests (SyncCfApiTest::testOnDemandFolderHonorsExclusions): Failed all five data rows (case variants of desktop.ini, default metadata exclusions, a custom rule, and an excluded directory) before the fix and passed all five after. Adjacent tests for avoiding implicit folder population and renaming online-only virtual directories also passed.
  • Windows-invalid filenames ([Windows/VFS]: On-demand VFS breaks when encountering file names with forbidden characters #9524): Reproduced the CFAPI error on Windows with a virtual directory containing only a zero-byte 13:37.md. With this PR, repeated enumeration succeeded with the invalid entry skipped, and valid sibling placeholders were still created. Also verified skipping filenames containing < and reserved device names such as CON.txt.
  • Build & static analysis: The Windows nextcloud target built successfully. The repository's clang-tidy automatic fix command completed cleanly, and changed-line clang-tidy checks reported no diagnostics.
  • Live-instance check: Manually verified a locally built Windows client combining fix(windows-vfs): apply sync exclusions to on-demand folder listings #11426 and fix(windows-vfs): reconcile obsolete ignored placeholders #11427 against a live Nextcloud instance; the previously observed issues no longer occurred (each fix was also verified independently via its native CFAPI regression tests).

Checklist

AI (if applicable)

OpenAI Codex (gpt-6.2-sol) assisted with investigation, implementation, tests and this pr description.

On-demand folder enumeration can expose ignored remote files as cloud
placeholders. Users should get the same exclusion behavior whether
the client discovers a file during sync or when they open a folder.

Fixes nextcloud#11414.

Signed-off-by: Jac0b-Shi <jac0b@jac0bshi.cn>
Assisted-by: Codex:gpt-6.2-sol
@Jac0b-Shi
Jac0b-Shi force-pushed the pr/11414-cfapi-respect-exclusions branch from a16d022 to 217ff35 Compare November 25, 2026 15:14
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.

Windows VFS bypasses file exclusion rules during on-demand folder enumeration

1 participant