nextcloud / nextcloud/desktop

[Bug]: Unexpected sync back of deleted folder structure

Open
#6,874 0 comments 0 reactions 0 assignees View on GitHub
1. to develop bug confirmed feature: :arrows_counterclockwise: sync engine feature: :minidisc: virtual filesystem os: :door: Windows
Dominant language
C++
Stars
3.9k
Forks
1k
Avg merge
1d 21h
Merged PRs (30d)
127

Description

### ⚠️ Before submitting, please verify the following: ⚠️

- [X] This is a **bug**, not a question or a configuration issue.
- [X] This issue is **not** already reported on Github (I've searched it).
- [X] Nextcloud Server and Desktop Client are **up to date**. See [Server Maintenance and Release Schedule](https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule) and [Desktop Releases](https://nextcloud.com/install/#install-clients) for supported versions.
- [X] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/)

### Bug description

After syncing a complex set of folders being renamed and/or moved, the client failed to synchronize all the changes at once due to one rename failing with a "Access is denied" error reported by native API on a `rename` system call.
After that the next subsequent sync attempts uploading some folders using their old names.

### Steps to reproduce

1. Prepare a sync folder with many folders with 4-5 depth of hierarchy inside a group folder
2. Sync them on windows with virtual files
3. Pause the sync client
4. Rename and move many folders including changing the depth of a folder with all its parents having been renamed (obviously except the group folder root folder itself)
5. Sync again
6. Sync should complete fine, without errors and without creating folders in their previous paths

### Expected behavior

Sync complete fine without errors and no folders are being uploaded by the client with wrong paths.

### Which files are affected by this bug

n/a

### Operating system

Windows

### Which version of the operating system you are running.

windows 10

### Package

Other

### Nextcloud Server version

28.0.6

### Nextcloud Desktop Client version

stable-3.13

### Is this bug present after an update or on a fresh install?

Fresh desktop client install

### Are you using the Nextcloud Server Encryption module?

Encryption is Disabled

### Are you using an external user-backend?

- [ ] Default internal user-backend
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other

### Nextcloud Server logs

_No response_

### Additional info

_No response_

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.