瀏覽代碼

Populate ignores upon adding a folder (fixes #996)

Audrius Butkevicius 11 年之前
父節點
當前提交
20dee618ea
共有 1 個文件被更改,包括 3 次插入0 次删除
  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()
 }