Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add (?d) ignore prefix, allowing them to be deleted #2944

Closed

Conversation

AudriusButkevicius
Copy link
Member

Purpose

Adds a (?d) prefix which marks the file as deletable, so that when we are deleting a directory, we can delete anything that is ignored and in our way.

Also, removes the need to specify the prefixes in a certain order.

Testing

Users will tell me if I deleted all of their photos

Screenshots

Documentation

Need some

if m == nil {
return false
return Result{false, false}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd generally prefer to see these as Result{include: false, deletable: false} to be explicit about what the various booleans are, or maybe just a Result{} as the zero value is a non-deletable non-included non-match, or as a named constant as we return it in a couple of places. But this is just a style opinion.

@calmh
Copy link
Member

calmh commented Apr 6, 2016

Looks awesome apart from the nit about the false, false stuff. Clean, simple and very useful.

@AudriusButkevicius
Copy link
Member Author

Updated.

@calmh
Copy link
Member

calmh commented Apr 7, 2016

@st-review merge this please

lib/ignore: Implement deletable ignores using (?d) prefix (fixes #1362)

@st-review
Copy link

OK, merged as 5a98af6. Thanks, @AudriusButkevicius!

@st-review st-review closed this Apr 7, 2016
@AudriusButkevicius AudriusButkevicius deleted the igdel branch April 7, 2016 09:40
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Jun 16, 2017
@syncthing syncthing locked and limited conversation to collaborators Jun 16, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants