diff --git a/lib/model/model.go b/lib/model/model.go index dac0019c3..53512e8f6 100644 --- a/lib/model/model.go +++ b/lib/model/model.go @@ -921,7 +921,9 @@ func (m *Model) SetIgnores(folder string, content []string) error { return fmt.Errorf("Folder %s does not exist", folder) } - fd, err := osutil.CreateAtomic(filepath.Join(cfg.Path(), ".stignore"), 0644) + path := filepath.Join(cfg.Path(), ".stignore") + + fd, err := osutil.CreateAtomic(path, 0644) if err != nil { l.Warnln("Saving .stignore:", err) return err @@ -935,6 +937,7 @@ func (m *Model) SetIgnores(folder string, content []string) error { l.Warnln("Saving .stignore:", err) return err } + osutil.HideFile(path) return m.ScanFolder(folder) }