Logo
Explore Help
Sign In
TheArchive/restic
1
0
Fork 0
You've already forked restic
mirror of https://github.com/restic/restic.git synced 2025-05-09 00:46:57 +00:00
Code Issues Packages Projects Releases Wiki Activity
restic/internal/backend/local/local_unix.go

15 lines
209 B
Go
Raw Normal View History

Create setNewFileMode function. Create separate files with setNewFileMode to avoid runtime checks.
2015-08-16 12:39:38 +02:00
// +build !windows
package local
import (
"os"
Run goimports
2017-07-23 14:21:03 +02:00
"github.com/restic/restic/internal/fs"
Create setNewFileMode function. Create separate files with setNewFileMode to avoid runtime checks.
2015-08-16 12:39:38 +02:00
)
// set file to readonly
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.
2020-10-06 18:46:19 +02:00
func setFileReadonly(f string, mode os.FileMode) error {
return fs.Chmod(f, mode&^0222)
Create setNewFileMode function. Create separate files with setNewFileMode to avoid runtime checks.
2015-08-16 12:39:38 +02:00
}
Reference in New Issue Copy Permalink
Powered by Gitea Version: 1.23.6 Page: 209ms Template: 6ms
English
Bahasa Indonesia Deutsch English Español Français Gaeilge Italiano Latviešu Magyar nyelv Nederlands Polski Português de Portugal Português do Brasil Suomi Svenska Türkçe Čeština Ελληνικά Български Русский Українська فارسی മലയാളം 日本語 简体中文 繁體中文(台灣) 繁體中文(香港) 한국어
Licenses API