Forráskód Böngészése

Populate ignores upon adding a folder (fixes #996)

Audrius Butkevicius 11 éve
szülő
commit
20dee618ea
1 módosított fájl, 3 hozzáadás és 0 törlés
  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()
 }