Browse Source

Hide .stigore (fixes #2114)

AudriusButkevicius 10 years ago
parent
commit
cf802dc67e
1 changed files with 4 additions and 1 deletions
  1. 4 1
      lib/model/model.go

+ 4 - 1
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)
 }