Nextcloud Sync writes corrupted files when paused
- 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 have searched for 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 Community,
I have a lot of images and PDF files in my Nextcloud. Since I pressed “Pause” during the download, it stopped syncing as expected. But the file it was in the middle of writing was corrupted. It was no longer readable. This is currently happening on all devices and operating systems. As soon as something happens—like an internet disconnection or I press pause—the current file isn’t written to completion properly. This renders the files unusable.
The Nextcloud client just keeps showing a message saying there was an error and that I should contact the admin. But I'm the admin :)
### Steps to reproduce
1. Right click on the file
2. Click on Share Options
3. The share dialog does not display the option to share by e-mail
...
### Expected behavior
1. Host a Nextcloud instance
2. Upload a large number of files
3. Start the download via the client.
4. Disconnect from the internet or pause the download partway through
5. Notice that 1–3 files are corrupted
### Which files are affected by this bug
The latest from the current download
### Operating system
Linux
### Which version of the operating system you are running.
Arch, Fedora, Debian and Win 11
### Installation method
Official Linux AppImage
### Nextcloud Server version
33
### Nextcloud Desktop Client version
33
### Did this occur after an update or on a clean installation?
Clean desktop client installation
### Are you using the Nextcloud Server Encryption module?
No
### Are you using an external user-backend?
- [ ] Default internal user-backend
- [ ] LDAP or Active Directory
- [ ] SSO - SAML
- [ ] Other
### Nextcloud Server logs
```shell
```
### Additional info
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.