local: mark repository files as read-only

This is intended to prevent accidental modifications of data files.
Marking the files as read-only was accidentally removed in #1258.
This commit is contained in:
Michael Eischer 2020-10-06 18:46:19 +02:00
parent 40ee17167e
commit f4282aa6fd
3 changed files with 5 additions and 4 deletions

View file

@ -9,6 +9,6 @@ import (
)
// set file to readonly
func setNewFileMode(f string, mode os.FileMode) error {
return fs.Chmod(f, mode)
func setFileReadonly(f string, mode os.FileMode) error {
return fs.Chmod(f, mode&^0222)
}