nextcloud / nextcloud/desktop

[BUG] Ghost files prevent Desktop clean up non-existing paths.

Open
#10,577 0 comments 0 reactions 0 assignees View on GitHub
0. Needs triage bug 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 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

User1 create folder/files on his VFS, while User2 sync User1 does operations like move/rename. User1 end up with folders that does not exist. Nextcloud client tries to move them to trash but report that there are files inside those folders. Files that are inside the folders are pointing to cloud files that returns 404 file not found, because they were never sync (downloaded to local drive for user2). Nextcloud client refuse to clean folder because there are files inside, files inside are link to already non-existings files on cloud. Nextcloud client refuse to clean non-existing files because it detects non-existing files with extra layer.

[20260811_0913_nextcloud.log](https://github.com/user-attachments/files/30926980/20260811_0913_nextcloud.log)

### Steps to reproduce

Is it unclear how to reproduce this issue, but it probably:
1. UserA creates folders and files on vfs
2. UserB starts to sync those files/folder on his vfs while UserA rename/delete them

### Expected behavior

When Client try to clean up folders on VFS the "is file inside" should be translated to "is file inside if its pointer in vfs is the file that link point to available"

### Which files are affected by this bug

project_info.json frame_pose.txt preview_image.jpg

### Operating system

Windows

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

Windows 11

### Installation method

Official Windows MSI

### Nextcloud Server version

34.0.0

### Nextcloud Desktop Client version

34.0.1

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

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

### Nextcloud Server logs

```shell

```

### Additional info

_No response_

Contributor guide

Open the contributing guide

Research direction

Start with the attached nextcloud log and the cleanup behavior for project_info.json, frame_pose.txt, and preview_image.jpg. Try to reproduce the VFS rename/delete and sync sequence described in the issue. Done means the client can clean folders containing pointers to cloud files that no longer exist, without incorrectly treating those pointers as present files.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.