Skip to content

.stfolder is deleted on folder removal even if the same folder is still being shared in other places #6106

@tomasz1986

Description

@tomasz1986
  1. Open the GUI of a clean Syncthing installation. The default folder list should look like this.

image

  1. Add a new folder pointing to the exactly same path as the "Default Folder".

image

  1. Remove the newly created folder using the GUI, and "rescan" the "Default Folder".

image

The following error message is shown,

Error on folder "Default Folder" (default): folder marker missing

and the folder is not being synced anymore.

I think that it would be useful if Syncthing did not remove .stfolder in a case where the same folder is still being shared in other places.

One can ask, why would you share the same folder multiple times? I personally have encountered this error when trying to share a folder from Android, and then realising that I would rather share a folder from a different device which would point at the same path. Thus, I accepted the newly shared folder, and then removed the one created previously in Android, as it was no longer needed. The result of the operation was as above.

This was just a simple mistake of mine, but I can also easily imagine valid reasons for sharing the same folder multiple times, such as having different ignore patterns for each of them, etc. In addition to that, to actually fix the problem, one needs to manually recreate the missing .stfolder which, depending on the operating system, may not be straightforward.

Version Information

Syncthing Version: v1.3.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugA problem with current functionality, as opposed to missing functionality (enhancement)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussion

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions