mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-24 09:47:19 +09:00
util: Generalize the file mode of 0666 with util.FileMode
This commit is contained in:
@@ -356,7 +356,7 @@ func WriteSettings(filename string) error {
|
||||
}
|
||||
|
||||
txt, _ := json.MarshalIndent(parsedSettings, "", " ")
|
||||
err = ioutil.WriteFile(filename, append(txt, '\n'), 0644)
|
||||
err = ioutil.WriteFile(filename, append(txt, '\n'), util.FileMode)
|
||||
}
|
||||
return err
|
||||
}
|
||||
@@ -378,7 +378,7 @@ func OverwriteSettings(filename string) error {
|
||||
}
|
||||
|
||||
txt, _ := json.MarshalIndent(settings, "", " ")
|
||||
err = ioutil.WriteFile(filename, append(txt, '\n'), 0644)
|
||||
err = ioutil.WriteFile(filename, append(txt, '\n'), util.FileMode)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user