mirror of
https://github.com/restic/restic.git
synced 2025-08-12 03:47:41 +00:00
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:
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user