nextcloud / nextcloud/desktop

Ignored Files/Dir should allow for matching directory specific files and subdirectories

Open
#7,370 2 comments 3 reactions 0 assignees View on GitHub
0. Needs triage
Dominant language
C++
Stars
3.9k
Forks
1k
Avg merge
1d 21h
Merged PRs (30d)
127

Description

### How to use GitHub

* Please use the 👍 [reaction](https://blog.github.com/2016-03-10-add-reactions-to-pull-requests-issues-and-comments/) to show that you are interested into the same feature.
* Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
* Subscribe to receive notifications on status change and new comments.

---

## Feature request

**Which Nextcloud Version are you currently using:** Latest / Irrelevant / 3.14.x

**Describe the solution you'd like**
It'd be nice if you could specify a particular parent directory name for ignoring files. For example, say I want to ignore the file OR directory named `bar`, but only when it is inside of `foo`. I could put either of the following entries for the desired use case:

`foo/bar`
`foo/bar/`

If these entries respected the parent directory name, then any *other* folders not named foo would allow for bar to continue to be synced. This adds a layer of functionality to the pattern matching so that a very particular use case can be accomplished, and prevent the unnecessary ignoring of syncing in other places.

**Describe alternatives you've considered**
The only alternative which seems to exist is blocking the entire `bar/` directory regardless of the parent `foo/`'s presence or not. This will often be okay, but in particular circumstances it may not be desirable. For example, when building Rust applications there are many files created in `target/debug/` and `target/release/`. Nextcloud struggles with syncing a lot of tiny files, and there's really nothing important in these directories which *requires* syncing anyways. If many Rust project folders are present within a Nextcloud directory, it can be desirable to specifically block `target/debug/` and `target/release/` while not impacting other `target` folders for other build projects. Unfortunately, the only existing solution seems to be to block all `target/` directories as of present.

I looked for duplicates, but I didn't see any. Apologies if I missed one.

Contributor guide

Open the contributing guide

Research direction

The issue names no implementation files, tests, or entry points. Start by locating the desktop client's ignored-file pattern matching and its related tests, then verify how entries such as foo/bar, foo/bar/, and target/debug/ are interpreted. Done means matching can restrict ignored files or directories to the specified parent path without affecting same-named paths elsewhere.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
desktop
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.