Default ignore pattern *~ (tilde) excludes valid directories (file/directory differentiation)
- 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
The default `sync-exclude.lst` includes the pattern `*~`, meaning anything that ends with a `~` will be ignored. I do agree this makes sense for files, but I don't think it should apply to directories. The broader issue here is that ignore patterns are used for both files and directories instead of one or the other.
https://github.com/nextcloud/desktop/blob/master/sync-exclude.lst
### Steps to reproduce
Have a folder ending on a a `~`, it will be excluded by the default rules. This is actually quite common for media works and music, especially from Asia. For example:
* `SUPER EUROBEAT presents INITIAL D ~D NON-STOP MEGAMIX~ `
* `Phantom ~Requiem for the Phantom~`
I must emphasise this is specifically about directories. The usage of `~` is also quite common in files but in for example `Eridanus ~Breathe~.flac` the file extension makes it not match.
### Expected behavior
Directories ending on `~` should not be ignored, only files ending on `~`. And perhaps if we are feeling fancy file/folder control in general could be done in some fashion such as this.
This would probably require a split of storage, but it is easy to keep backwards compat:
* `sync-exclude.lst` for both files and folders (current behaviour)
* `sync-exclude-files.lst` only files
* `sync-exclude-folders.lst` only folders
The majority of current default patterns is file-specific and should probably be moved to files.
### Which files are affected by this bug
Folders
### Operating system
Linux
### Which version of the operating system you are running.
Debian testing
### Package
Distro package manager
### Nextcloud Server version
any
### Nextcloud Desktop Client version
any
### Is this bug present after an update or on a fresh install?
Fresh desktop client install
### Are you using the Nextcloud Server Encryption module?
Encryption is Enabled
### Are you using an external user-backend?
- [ ] Default internal user-backend
- [ ] LDAP/ Active Directory
- [ ] SSO - SAML
- [ ] Other
### Nextcloud Server logs
```shell
```
### Additional info
_No response_
Contributor guide
Assessment
This issue has not been assessed yet.