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

Human readable errors on attempted deletion of non-empty directory #4476

Closed
AudriusButkevicius opened this issue Oct 31, 2017 · 12 comments
Closed
Assignees
Labels
enhancement New features or improvements of some kind, as opposed to a problem (bug) frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion
Milestone

Comments

@AudriusButkevicius
Copy link
Member

Given we know there are files that are not deletable and ignored, we could return a more descriptive error.
Also of we discover stuff we don't have in the index, we could force rescan.

@generalmanager
Copy link

I just created a similar ticket for the case where local files can't be read or are ignored because they are symlinks (#4480). We should probably use the same kind of UI signaling in both cases. Also 👍

@AudriusButkevicius
Copy link
Member Author

This has nothing todo with UI.

@generalmanager
Copy link

What I meant is that the kind of UI I described in #4480 could also be appropriate for the case where ignored files/subdirectories or ACL prevent the deletion of a directory.
I didn't grasp all the details of #4475 and this tickets connection to it before reading it in it's entirety, so I get if you want to keep the scope of this issue focused on the error message and triggering a rescan.

I just wanted to leave a note to a possible UI improvement in case #4480 is accepted, so that this and similar cases where local stuff can't be deleted would be treated similarly to local stuff not beeing readable. Apoligies if you felt that I sidetracked from the topic.

@AudriusButkevicius
Copy link
Member Author

It seems you are confused. This ticket doesn't need a UI nor does #4475.

@generalmanager
Copy link

I understand that neither an improved error message nor triggering a rescan or bumping a version on the db needs any kind of UI. I just wanted to leave a note saying that IF it should be decided to build some kind of user-facing message in regard to unaccessible files (which the issue I opened is about) then it could also make sense to use the same UI to inform the user about beeing unable to delete local folders (with ignored stuff inside it beeing one possible reason).

I agree that not beeing able to delete something isn't necessarily of utmost importance to the user, this was really only meant as a small annotation, mainly to get the tickets linked so when this is built, one takes a second to think if the UI which might be built for #4480 would also be useful for this, preventing additional work in the future. But now with all the back-and-forth it's really starting to distract from the main issue. So please feel free to delete my comments here.

imsodin added a commit to imsodin/syncthing that referenced this issue Nov 8, 2017
@calmh calmh added the enhancement New features or improvements of some kind, as opposed to a problem (bug) label Nov 17, 2017
@calmh calmh added this to the Planned milestone Nov 17, 2017
st-review pushed a commit that referenced this issue Dec 7, 2017
@calmh
Copy link
Member

calmh commented Dec 7, 2017

Closed by #4493

@calmh calmh closed this as completed Dec 7, 2017
@calmh
Copy link
Member

calmh commented Dec 7, 2017

@imsodin what was the resolution in relation to this issue, I'm not sure I understand the action here

@AudriusButkevicius
Copy link
Member Author

It returns more readable errors and schedules scans from within delete if there are unscanned entries.

@calmh
Copy link
Member

calmh commented Dec 7, 2017

So given the dir is resurrected and rescanned, which is #4475, does the user ever see or care about the error?

@calmh
Copy link
Member

calmh commented Dec 7, 2017

I'm trying to get this retitled to something intelligible for the release notes, or decide to not include it

@imsodin
Copy link
Member

imsodin commented Dec 7, 2017

In the time until the scan and the next pull (timer based) happens, the folder deletion will show up as a failed item with now a descriptive error message instead of just "dir not empty" (or something similar).

I think the most important part is for ignored items in to be deleted dirs: Before you got a generic "dir not empty" type error in the list (we got a lot of support questions about that), now the error will be
directory contains ignored files (see ignore documentation for (?d) prefix).

Title sounds quite accurate, I would just replace "Dir not empty" with something a bit more descriptive, along the lines of "Give a better error description and rescan if appropriate when a directory cannot be removed" (then again, my descriptions have a history of being less than intelligible :) ).

@calmh calmh changed the title Dir not empty can return a better error/rescan Human readable errors on attempted deletion of non-empty directory Dec 7, 2017
@calmh calmh modified the milestones: Planned, v0.14.42 Dec 7, 2017
@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 Dec 8, 2018
@syncthing syncthing locked and limited conversation to collaborators Dec 8, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New features or improvements of some kind, as opposed to a problem (bug) frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion
Projects
None yet
Development

No branches or pull requests

5 participants