Windows Virtual Files: local folder cannot be removed after deletion on server
- 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
When a folder is deleted via the Nextcloud web interface, the Windows Desktop Client detects that the folder was removed from the server, but fails to remove the corresponding local Virtual Files folder.
Nextcloud reports:
"Temporary error when removing a local item that was removed from the server."
Windows Explorer also fails to delete the remaining local folder with:
"Error 0x80070091: The directory is not empty."
However, the same local folder can be deleted successfully using PowerShell:
Remove-Item -LiteralPath "C:\Nextcloud\test_folder" -Recurse -Force
PowerShell completes without any error.
Immediately afterwards, Nextcloud Desktop reports "Everything is synced!".
Server: Nextcloud 31.0.14 Enterprise (IONOS)
Desktop Client: 34.0.2
OS: Windows 11
Virtual Files: Enabled
### Steps to reproduce
1. Synchronize a folder with Nextcloud Desktop using Virtual Files.
2. Delete the folder via the Nextcloud web interface.
3. Wait for the Windows Desktop Client to synchronize the deletion.
4. Nextcloud detects that the folder was removed from the server, but fails to remove the local folder.
5. Try to delete the remaining local folder using Windows Explorer.
6. Windows Explorer reports error 0x80070091: "The directory is not empty."
7. Delete the same folder using PowerShell with Remove-Item -Recurse -Force.
8. The folder is deleted successfully and Nextcloud immediately reports "Everything is synced!".
### Expected behavior
When a folder is deleted on the server, Nextcloud Desktop should automatically remove the corresponding local Virtual Files folder without requiring manual deletion via PowerShell.
### Which files are affected by this bug
test_folder
### Operating system
Windows
### Which version of the operating system you are running.
Windows 11
### Installation method
Official Windows MSI
### Nextcloud Server version
31.0.14
### Nextcloud Desktop Client version
34.0.2
### Did this occur after an update or on a clean installation?
Minor version update (i.e. 33.0.0 → 33.0.1)
### 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.