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.
This commit is contained in:
@@ -1323,7 +1323,7 @@ func (m *Model) internalScanFolderSubs(folder string, subs []string) error {
|
|||||||
var unifySubs []string
|
var unifySubs []string
|
||||||
nextSub:
|
nextSub:
|
||||||
for _, sub := range subs {
|
for _, sub := range subs {
|
||||||
for sub != "" {
|
for sub != "" && sub != ".stfolder" && sub != ".stignore" {
|
||||||
if _, ok = fs.Get(protocol.LocalDeviceID, sub); ok {
|
if _, ok = fs.Get(protocol.LocalDeviceID, sub); ok {
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user