?d: "directory has been deleted on a remote device but is not empty; the contents are probably ignored on that remote device, but not locally"

On Android, I delete folder/+, but this deletion is not propagated to my computer. I ignore + on Android. I get this error in the failed items on the computer:

“directory has been deleted on a remote device but is not empty; the contents are probably ignored on that remote device, but not locally”

My ignore pattern on Android is this:

(?d)**/+

I’ve also tried with:

(?d)**/+

I thought that (?d) should do the trick, but apparently it’s not. What am I missing?

I’ve checked this thread:

But I’m not sure how up to date Files matching (?d) rule aren't deleted - #9 by imsodin is.

Setup: Android device 1.18 Computer 1.18

I would test (?d)+ once, that should be enough.

Same error if I add (?d)+ to the list of patterns.

Is the file that you want to ignore actually called +? Could you post some screenshots of the GUI showing the aforementioned errors?

Is the file that you want to ignore actually called +?

It’s a folder, and yes it’s called +.

The error does not look like its talking about +.

+ is a subfolder of the folder mentioned in the screenshot.

To clarify, I’m actually deleting folder (and thus folder/+ as well) on Android. On my computer, everything but folder/+ (and the files it contains) is deleted. I’d like to ensure that folder/+ is deleted as well on the computer.

I don’t think (?d)foo/+ is recursive, namely it only ignores the directory itself, not it’s content.

(?d)foo/+/** might work, but I am not sure.

Right now these are my patterns:

(?d)**/+/**
(?d)+

but it doesn’t work like this apparently.

I want to ignore all folders named + hence the first pattern.

Any other idea I can try out? It looks like a simple use-case for a (?d) pattern, doesn’t it?

Could you give a concrete example of a (full) path that has this problem? You can censor or rename the files if you don’t want to share them. I will try to recreate the exact paths in my system and see what happens here.

Within a shared folder, have this:

folder1/+/test_file.txt

given no .stignore on device A, and these patterns on device B:

flac/
(?i)(?d)**/*.flac
(?d)**/+/**
(?d)+

(the first two shouldn’t be relevant).

From device B, delete folder1 (which never had folder1/+ to begin with, but did have folder1).

This results in a failed item folder1 on device A.

What is the content (in the filesystem) of folder1 on A?

Yeah, so I have just tested this myself. I don’t think that this is how (?d) is supposed to work. Basically, you need to have (?d)+ ignored on device A (not B), and then if you delete folder1 on device B, device A will also delete it (together with its + subfolder).

Can contain anything else, but it contains +.

And after deletion on B, it still contains the files it contained before, because of the failure I guess.

Ok thanks for the clarification, I misunderstood then, I’ll try this out!

Ah I missed that bit: Indeed if device B deletes folder1 while having ignored some children, and A has not ignored those children, you will get that error. That’s working as intended, as A is told to delete folder1 but is not told anything about deleting the child, so it doesn’t delete the child. You need to ignore it with (?d) everywhere.

Yes that seems to do the trick on device A, thank you both!

The problem with this approach is that I will have to ignore this on all other devices that share this folder, or I will have similar errors. Would it makes sense to have a flag `?D? implementing the behavior I expected? Or is that too much of a footgun?

How would that work? The device ignores the item, it might not even have it, so it can’t tell anyone else to delete it. Plus I am pretty sure if one could come up with something “consistent”, then it would be too much of a footgun (would amount to deleting items automatically).

In my example, the device would say “delete everything in folder1 including what I have no clue about that’s inside this folder”. It’s not about the ignored item itself, but deleting a parent of it, and what changes are propagated.