Skip to content

Fix removal of a marker when there are still folders referencing it (fixes #6106) - #6114

Merged
AudriusButkevicius merged 1 commit into
syncthing:masterfrom
ruslanye:folder_removal
Oct 30, 2019
Merged

AudriusButkevicius merged 1 commit into
syncthing:masterfrom
ruslanye:folder_removal

Conversation

@ruslanye

Copy link
Copy Markdown
Contributor

Purpose

I modified RemoveFolder to fix #6106
After the changes, if someone tries to remove a folder, path of which is still referenced, the .stfolder won't be removed.

Testing

I checked changes manually. I'm not sure if unit tests are needed.

Comment thread lib/model/model.go
}
if isPathUnique {
// Delete syncthing specific files
cfg.Filesystem().RemoveAll(config.DefaultMarkerName)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Error return value of (github.com/syncthing/syncthing/lib/fs.Filesystem).RemoveAll is not checked (from errcheck)

@AudriusButkevicius
AudriusButkevicius merged commit 3b5dff3 into syncthing:master Oct 30, 2019
@ruslanye
ruslanye deleted the folder_removal branch October 30, 2019 22:31
calmh added a commit to calmh/syncthing that referenced this pull request Nov 6, 2019
* master:
  gui: New folder state "Local Additions" for receive-only (fixes syncthing#5968) (syncthing#6117)
  lib/model: Fix removal of a marker when there are still folders referencing it (syncthing#6114)
  build: I like long, complicated things, ok?
@calmh calmh added this to the v1.3.2 milestone Nov 8, 2019
@st-review st-review added the frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion label Oct 30, 2020
@syncthing syncthing locked and limited conversation to collaborators Oct 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

frozen-due-to-age Issues closed and untouched for a long time, together with being locked for discussion

Projects

None yet

Development

Successfully merging this pull request may close these issues.

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

5 participants