mirror of
https://github.com/octoleo/syncthing.git
synced 2025-01-03 15:17:25 +00:00
This commit is contained in:
parent
e0dd737822
commit
3f2b584c4e
@ -296,8 +296,10 @@ func (f *folder) getHealthErrorAndLoadIgnores() error {
|
||||
if err := f.getHealthErrorWithoutIgnores(); err != nil {
|
||||
return err
|
||||
}
|
||||
if err := f.ignores.Load(".stignore"); err != nil && !fs.IsNotExist(err) {
|
||||
return errors.Wrap(err, "loading ignores")
|
||||
if f.Type != config.FolderTypeReceiveEncrypted {
|
||||
if err := f.ignores.Load(".stignore"); err != nil && !fs.IsNotExist(err) {
|
||||
return errors.Wrap(err, "loading ignores")
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
@ -331,8 +331,10 @@ func (m *model) StartDeadlockDetector(timeout time.Duration) {
|
||||
// Need to hold lock on m.fmut when calling this.
|
||||
func (m *model) addAndStartFolderLocked(cfg config.FolderConfiguration, fset *db.FileSet, cacheIgnoredFiles bool) {
|
||||
ignores := ignore.New(cfg.Filesystem(), ignore.WithCache(cacheIgnoredFiles))
|
||||
if err := ignores.Load(".stignore"); err != nil && !fs.IsNotExist(err) {
|
||||
l.Warnln("Loading ignores:", err)
|
||||
if cfg.Type != config.FolderTypeReceiveEncrypted {
|
||||
if err := ignores.Load(".stignore"); err != nil && !fs.IsNotExist(err) {
|
||||
l.Warnln("Loading ignores:", err)
|
||||
}
|
||||
}
|
||||
|
||||
m.addAndStartFolderLockedWithIgnores(cfg, fset, ignores)
|
||||
|
Loading…
Reference in New Issue
Block a user