nextcloud / nextcloud/desktop

[Bug]: renaming not empty ignored folder trigger its content to be removed

Open
#6,720 2 comments 0 reactions 0 assignees View on GitHub
1. to develop bug confirmed feature: :arrows_counterclockwise: sync engine feature: :minidisc: virtual filesystem os: :door: Windows
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

if a local folder is ignored (i.e. the name matches ignore patterns), the desktop files client will not sync it to the server.
in files explorer, the status icon will be empty (i.e. no status icon)
once you rename it such that it will be synced to the server, the content of the folder will be deleted

### Steps to reproduce

1. Create a new folder
2. Rename it to `testIgnore`
3. Add some files inside it
4. Wait for sync to happen
5. Free up storage such that the new not empty folder gets a cloud status icon
6. Add a rule to ignore all items with pattern: `*.msg`
7. Rename `testIgnore` to `testIgnore.msg`
8. Wait for sync to happen
9. Rename `testIgnore.msg` to `testIgnore`
10. Wait for sync to happen
11. Checks the content of the folder

### Expected behavior

Files stored in this folder (or in its sub-folders) are not deleted

### Which files are affected by this bug

n/a

### Operating system

Windows

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

windows 10

### Package

Other

### Nextcloud Server version

28.0.3

### Nextcloud Desktop Client version

master branch

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

Updated from a minor version (ex. 3.4.2 to 3.4.4)

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

_No response_

### Additional info

_No response_

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.