Can two folder overlap?

Hi, I have the folder “MainFolder” that I’m syncing between two devices.

And I have a 3rd device that it should be only be allowed to sync an specific folder (“bar2”) inside of the previously shared “syncthing folder”.

E.g. giving: MainFolder/ foo foofoo bar/ baz quux quuz bar2/ baz frobble

The folder “MainFolder” should be synced between Machine A and B And the machine C should only know and sync the folder “bar2”

Can I add two Syncthing folders, one for “MainFolder” and another for “Mainfolder/bar2” and share the 1st between with A and B and the between with A, B and C?

Cheers MC

I think this is answered in the faq

Was that PR changing the wording merged? As before the faq essentially said “You can, but don’t”. While the answer is “You can - make sure you know what you’re doing”. As long as you don’t do cyclic includes you should be good.

I don’t think so, the faq currently says:

2.2.12. Am I able to nest shared folders in Syncthing?

Do not share a folder which is inside another shared folder. This behaviour is in no way supported, recommended or coded for in any way, and comes with many pitfalls.

Yeah, it’s just an issue, no PR yet, so I created one: https://github.com/syncthing/docs/pull/439

If you’re the owner of machine C, you could use on it the Ignores feature in the folder’s settings. i.e. you use this syntax IIRC

!foo/bar/bar2
foo/bar/*
!foo/bar
foo/*
!foo
*

Don’t forget the final *

This way, you won’t get the red warnings on nested folder’s path in DEV A & B

You don’t need ignores for other parts of the tree anymore.

Aud means you’d just need

!foo/bar/bar2
*

Last time I tried I remember there was some problem, maybe for other historical reason (previously known resurrected ! excludes)