[Bug]: File deleted in edge case
- Dominant language
- C++
- Stars
- 3.9k
- Forks
- 1k
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 123
Description
### ⚠️ This issue respects the following points: ⚠️
- [x] This is a **bug**, not a question or a configuration/webserver/proxy issue.
- [x] This issue is **not** already reported on [Github](https://github.com/nextcloud/server/issues?q=is%3Aopen+is%3Aissue+label%3Abug) OR [Nextcloud Community Forum](https://help.nextcloud.com/) _(I've searched it)_.
- [x] Nextcloud Server **is** up to date. See [Maintenance and Release Schedule](https://github.com/nextcloud/server/wiki/Maintenance-and-Release-Schedule) for supported versions.
- [x] I agree to follow Nextcloud's [Code of Conduct](https://nextcloud.com/contribute/code-of-conduct/).
### Bug description
Hello,
first of all, my issue sound somewhat similar to this one, but it is not the same imho: https://help.nextcloud.com/t/unchecked-folders-will-be-removed-from-your-file-system/12335/5
I had to update a nextCloud server (from 21.0.0.18 to 32.0.0.13 - why the client did not update earlier is another story) . During the update the sync for all users was off.
One user saved a file in his local nextCloud folder. When the server was up and running again, the folder share was gone. Consequently, the desktop client removed the folder from the local folder. Together with the unsynced (only locally present) file.
The deleted file is neither in the nextCloud nor in the local bin.
I consider this behavior as a bug.
### Steps to reproduce
1. Turn off desktop sync
2. Create a local file in a shared folder (creator is not folder owner)
3. Unshare the folder
4. Turn on desktop sync
### Expected behavior
Option 1: File moved to bin
Option 2: Warning message
Option 3: File synced
### Nextcloud Server version
32
### Operating system
Debian/Ubuntu
### PHP engine version
PHP 8.2
### Web server
Apache (supported)
### Database engine version
MySQL
### Is this bug present after an update or on a fresh install?
Upgraded to a MAJOR version (ex. 31 to 32)
### Are you using the Nextcloud Server Encryption module?
Encryption is Disabled
### What user-backends are you using?
- [x] Default user-backend _(database)_
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other
### Configuration report
```json
```
### List of activated Apps
```shell
```
### Nextcloud Signing status
```shell
```
### Nextcloud Logs
```json
```
### Additional info
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.