Explorar o código

Populate ignores upon adding a folder (fixes #996)

Audrius Butkevicius %!s(int64=11) %!d(string=hai) anos
pai
achega
20dee618ea
Modificáronse 1 ficheiros con 3 adicións e 0 borrados
  1. 3 0
      internal/model/model.go

+ 3 - 0
internal/model/model.go

@@ -1004,6 +1004,9 @@ func (m *Model) AddFolder(cfg config.FolderConfiguration) {
 		m.deviceFolders[device.DeviceID] = append(m.deviceFolders[device.DeviceID], cfg.ID)
 	}
 
+	ignores, _ := ignore.Load(filepath.Join(cfg.Path, ".stignore"), m.cfg.Options().CacheIgnoredFiles)
+	m.folderIgnores[cfg.ID] = ignores
+
 	m.addedFolder = true
 	m.fmut.Unlock()
 }