Skip to content

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

Closed

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

Activity

  1. added
    bug
    on Oct 25, 2019
  2. GremL1N commented on Oct 25, 2019

    @GremL1N

    On my Windows 10 (1809) i can't create files starting with dot in name. It think thats an extension and want the name of file.
    I can do it just in cmd throught echo "">.stfolder or mkdir .stfolder

  3. erigul commented on Oct 25, 2019

    @erigul

    On my Windows 10 (1809) i can't create files starting with dot in name. It think thats an extension and want the name of file.
    I can do it just in cmd throught echo "">.stfolder or mkdir .stfolder

    I guess not strictly related to this issue, but you can create a file/folder named ".name" in the Windows GUI by naming the file ".name." and windows will accept an empty extension and remove the final dot.

  4. ruslanye commented on Oct 30, 2019

    @ruslanye
    Contributor

    Hello, I'd like to work on this issue

  5. AudriusButkevicius commented on Oct 30, 2019

    @AudriusButkevicius
    Member

    Sure, go ahead. I think the fix is just to check if there are other folders referencing the same path as a folder is removed.

  6. added
    frozen-due-to-age
    on Oct 30, 2020
  7. locked and limited conversation to collaborators on Oct 30, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugfrozen-due-to-age

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions