Need to hold lock on m.mut when calling this.
(cfg config.FolderConfiguration, cacheIgnoredFiles bool)
| 336 | |
| 337 | // Need to hold lock on m.mut when calling this. |
| 338 | func (m *model) addAndStartFolderLocked(cfg config.FolderConfiguration, cacheIgnoredFiles bool) { |
| 339 | ignores := ignore.New(cfg.Filesystem(), ignore.WithCache(cacheIgnoredFiles)) |
| 340 | if cfg.Type != config.FolderTypeReceiveEncrypted { |
| 341 | if err := ignores.Load(".stignore"); err != nil && !fs.IsNotExist(err) { |
| 342 | slog.Error("Failed to load ignores", slogutil.Error(err)) |
| 343 | } |
| 344 | } |
| 345 | |
| 346 | m.addAndStartFolderLockedWithIgnores(cfg, ignores) |
| 347 | } |
| 348 | |
| 349 | // Only needed for testing, use addAndStartFolderLocked instead. |
| 350 | func (m *model) addAndStartFolderLockedWithIgnores(cfg config.FolderConfiguration, ignores *ignore.Matcher) { |
no test coverage detected