nextcloud / nextcloud/desktop

[Bug]: MacOS client deletes local folder when renamed for

Open
#9,318 0 comments 0 reactions 0 assignees View on GitHub
0. Needs triage bug os: :apple: macOS
Dominant language
C++
Stars
3.9k
Forks
1k
Avg merge
1d 17h
Merged PRs (30d)
123

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

Hello,
One of our customers encountered some trouble with macOS Sync client v4.
The sync client was on error for one folder "error transferring https://xxxx.tld/remote.php/dav/files/username/path/to/folder with, coma in name/examplefolder/files.pdf server replied : not found"

As a workaround, we tried renaming the folder to remove the coma, still no sync.
Then we tried duplicating the PDF file, but the same error happened.

In the end, we duplicated the folder "examplefolder" with CMD+D, the copy got synced, but then the original folder got deleted by the sync client.

### Steps to reproduce

Not quite sure how to reproduce but with a file not syncing with "not found error"
1. rename file
2. duplicate parent folder
3. wait for sync

### Expected behavior

Getting the reason for "not found" in sync error, although the folder exists, and keeping original folder when duplicating it.

### Which files are affected by this bug

file ending in 06-10-25.pdf

### Operating system

macOS

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

23.6.0

### Package

Official macOS Virtual files 12+ universal pkg

### Nextcloud Server version

31.0.9

### Nextcloud Desktop Client version

4.0.3

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

Updated from a minor version (ex. 3.16.1 to 3.16.2)

### 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

```shell
audit.log:{"reqId":"TM1NW3yvfOdAFSmAdcs8","level":1,"time":"2025-12-15T14:51:10+01:00","remoteAddr":"aa.xx.yy.zz","user":"user@domain.tld","app":"admin_audit","method":"MOVE","url":"/remote.php/dav/files/user@domain.tld/_path/to/folder with coma, in name","message":"File renamed with id \"916539\" from \"/user@domain.tld/files/_path/to/folder with coma, in name\" to \"/user@domain.tld/files/_same_path/to/folder with dot. in name\"","userAgent":"Mozilla/5.0 (Macintosh) mirall/4.0.3 (Nextcloud, macos-23.6.0 ClientArchitecture: arm64 OsArchitecture: arm64)","version":"31.0.9.1","clientReqId":"d781e7b7-b1ad-4fca-8e2f-7b5d364abac7","data":{"app":"admin_audit"}}

audit.log:{"reqId":"daJ2Uq1OGtNV2cRHKn78","level":1,"time":"2025-12-15T14:58:12+01:00","remoteAddr":"aa.xx.yy.zz","user":"user@domain.tld","app":"admin_audit","method":"MKCOL","url":"/remote.php/dav/files/user@domain.tld/path/to/folder/with dot in name/examplefolder duplicate","message":"File with id \"1570745\" created: \"/user@domain.tld/files/_same_path/to/folder with dot. in name/examplefolder duplicate\"","userAgent":"Mozilla/5.0 (Macintosh) mirall/4.0.3 (Nextcloud, macos-23.6.0 ClientArchitecture: arm64 OsArchitecture: arm64)","version":"31.0.9.1","clientReqId":"6adc75df-add6-4039-9b7f-73afebf143e7","data":{"app":"admin_audit"}}
```

### Additional info

I have access to more server logs and client archive if needed.

Amongst lines in debug archive, I can find a
```
discovered "/path/to/folder with dot. in name/examplefolder" CSyncEnums::CSYNC_INSTRUCTION_REMOVE OCC::SyncFileItem::Down CSyncEnums::ItemTypeDirectory
```

and then proceeding to delete :
```
info nextcloud.sync.propagator /Volumes/builds/35543/macos-35543-build/arm64/macos-clang-arm64/build/nextcloud-client/work/build/src/libsync/nextcloudsync_autogen/EWIEGA46WW/../../../../../../../../../../../macos-35543/src/libsync/owncloudpropagator.h:213 ]: Starting CSyncEnums::CSYNC_INSTRUCTION_REMOVE propagation of "/path/to/folder with dot. in name/examplefolder" by OCC::PropagateLocalRemove(0x600001334460)
```

Why was the original examplefolder content not syncing, and how come the duplication of examplefolder gets the original deleted ?

Thanks for any hint on making sure this doesn’t happen anymore,
kind regards.

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.