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:
parent
40ee17167e
commit
f4282aa6fd
3 changed files with 5 additions and 4 deletions
|
@ -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)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue