From 49601a63c870c51404de124589414731f28e6004 Mon Sep 17 00:00:00 2001 From: Michael Ploujnikov Date: Fri, 22 Jan 2016 22:37:58 -0500 Subject: [PATCH] Model.internalScanFolder: Don't ignore special .stfolder and .stignore files. Fixes #2151. Since Walk.walkAndHashFiles ignores .stfolder and .stignore, they will never be found by fs.Get(protocol.LocalDeviceID, sub) in Model.internalScanFolder. As a result, when asked to scan those subs we end up scanning the whole folder. --- lib/model/model.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/model/model.go b/lib/model/model.go index 5ed5e8973..5ea775394 100644 --- a/lib/model/model.go +++ b/lib/model/model.go @@ -1323,7 +1323,7 @@ func (m *Model) internalScanFolderSubs(folder string, subs []string) error { var unifySubs []string nextSub: for _, sub := range subs { - for sub != "" { + for sub != "" && sub != ".stfolder" && sub != ".stignore" { if _, ok = fs.Get(protocol.LocalDeviceID, sub); ok { break }