fix(windows): Prevent reupload of placeholder dirs deleted remotely - #10576
Conversation
There was a problem hiding this comment.
Pull request overview
Prevents Windows VFS from reuploading stale virtual directories deleted remotely.
Changes:
- Removes orphaned virtual-directory placeholders.
- Adds regression coverage for stale placeholders and normal local folders.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
src/libsync/discovery.cpp |
Detects and removes stale virtual directories. |
test/testsynccfapi.cpp |
Tests stale-placeholder removal and local-folder upload. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
…d remotely Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Claudio Cambra <developer@claudiocambra.com>
Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
3bd9239 to
f797f12
Compare
fix test failure by removing expected to fail sync run call Signed-off-by: Matthieu Gallien <matthieu.gallien@nextcloud.com>
|
Artifact containing the AppImage: nextcloud-appimage-pr-10576.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. |
|
|
/backport to stable-34.0 please |



Summary
There is a bug in which remotely-deleted folders can be reuploaded by the Windows VFS client. This fix detects a virtual directory with no database record and no remote entry and deletes the local entry instead. A normal folder created locally is reported as ItemTypeDirectory, so it still follows the normal upload path.
TODO
Checklist
AI (if applicable)