Receive only folder file collision?

Hi

I have a problem understanding the receive only folder type documentation.

If a number of people are connected to a receive only folder, what prevents overwriting of files. If the syn files but a directory/folder already exists in that receive only folder for example. Or they send different files with the same filename. Will the files be renamed or overwritten?

And what determines to what they will be renamed?

How to the connecting devices know what is inside the receive only folder if they want to contribute?

Hi synci, welcome to the syncthing community :slight_smile:

I wont try to answer your questions directly in the following, mainly because I am not sure I properly understand them. However hopefully I can provides some useful info that either already clarifies some things for you or in turn clarifies your question in followups.

It seems like you try to understand/explain how syncthing works in a way that that’s quite incompatible with how it really does. And potentially bundled with a misconception of receive-only type folders. Both things are pretty common. Thus hoping to not “only” help you, but others as well, I’d like to point you at some docs for starters to see if that can help. And if not so you can ask followup questions, which ideally might even allow us to improve docs. Admittedly the docs I found are not quite as understandable as I’d hoped or targeted specifically at your questions, but lets still give it a try:

It’d be great if you could check those out, and based on them give a shot at answering your own questions or maybe restating them with the new info in mind (and/or ask questions on the docs of course).

2 Likes

The explanation of receive only folders has 4 paragraphs. After reading the entire section 4-5 times I still don’t understand it.

An image with a bunch of circles representing nodes and vectors pointing to data flow and I would probably grasp it within 1-3 or 1-6 seconds.

Ok I see, my previous approach didn’t work here :slight_smile:
Did the first point on “Syncing” make any sense? That’s the most important one. At least if I understand your questions/confusion right, because then nodes and vectors wont help. A receive-only folder works just the same as a standard send-receive folder when it comes to syncing: It knows about all the files that the connected devices have and it has itself. Every file (as in path from folder root) is independent. And if there’s more than one version for a file among all the devices, it decides which one is the “desired” (typically latest) one - that’s called the “global” version. And if the global isn’t what’s locally on disk, it syncs/pulls/requests that data from others.
Again, the above is the same for all folder types. A receive-only folder behaves differently in an unrelated scenario: When a file changes locally. Normally when that happens and the file was in sync, that new locally changed file becomes the new global version and all other devices will recognize that and pull it in/sync it. Except for a receive-only folder, where the entire purpose is that such local changes don’t propagate. So instead of considering the changed file the new global version, the receive-only folder applies an internal flag to that file which makes it invalid - other devices wont sync it and you get notified in the UI about these changes (and can revert them).

2 Likes