util: Generalize the file mode of 0666 with util.FileMode

This commit is contained in:
Jöran Karl
2024-05-30 21:14:04 +02:00
parent 69064cf808
commit 18a81f043c
6 changed files with 12 additions and 8 deletions

View File

@@ -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
}