Actually now that I have found the comment I was talking about, I think this is something different. Everything is working as expected, but the way it’s intended to work isn’t ideal. The following should reproduce the “problem”:
- Devices A and B have the same file at
foo/bar
, device A has ignore patternbar
. - On A
foo
is deleted -> Syncthing marksfoo
as deleted and sends that info to B - it doesn’t do anything aboutfoo/bar
, as it’s ignored. - B tries to get in sync, thus tries to delete
foo
but correctly realizes that there is stillfoo/bar
.
Result: Pull error Puller (folder "label" (id), file "foo/bar"): delete dir: directory is not empty
.
Firstly the error could mention that this is likely due to different ignore patterns between devices. However even if this is clear to the user, there are two ways forward:
-
The file should also be ignored and deleted on B -> add
(?d)bar
to ignore patterns - problem solved. -
The file should actually be kept -> you need to touch
foo/bar
for it to be updated - that’s not user friendly.
Alternatives for 2 (none of them seem practical to me):
- Automatically recreate the parent directory. Seems weird because from the point of view of A, that means it deletes a directory and Syncthing just silently recreates it without anything in it.
- Ditch directories aka consider them just as a means to store file in, don’t actively sync them - that’s overkill for such a fringe case.
The only realistic idea I have is to add a link to the error message pointing to a FAQ question in the docs explaining the issue.