Skip to content

Incorrect handling of path for auto accepted folder #8859

Closed

Description

@calmh

There's a problem in the logic for auto-accepted folders. The idea is that the folder should be placed in a subdirectory to the "default folder path", with the subdirectory name generated from the folder label or ID, in that order. We ensure that this path doesn't exist before starting to use it. However,

  1. if the label (or sanitised ID) is empty, Syncthing will try to use the default folder path itself
  2. if we're auto-accepting multiple folders at the same time, we might add two or more with the same path, because the folder path isn't created until later when the folder is started.

By default, the default folder path is the user home directory which is very likely to already exist (or Syncthing is likely to be unable to create it), and if it's something else it's guaranteed to exist once a folder has been accepted. This should make point one a fairly rare problem "in the wild". Point two is a problem only when multiple folders with identical labels are shared simultaneously.

Activity

  1. added
    bug
    on Apr 9, 2023
  2. added 2 commits that reference this issue on Apr 13, 2023
    d89a1bd
    b69598f
  3. added this to the v1.23.5 milestone on Apr 28, 2023
  4. added a commit that references this issue on May 9, 2023
    8c282de
  5. added a commit that references this issue on Jan 28, 2024
    f59ffc8
  6. added
    frozen-due-to-age
    on Apr 10, 2024
  7. locked and limited conversation to collaborators on Apr 10, 2024
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions