backend: consistently use os package for filesystem access
The go std library should be good enough to manage the files in the backend and cache folders.
This commit is contained in:
parent
ca1e5e10b6
commit
24f4e780f1
9 changed files with 33 additions and 50 deletions
|
@ -8,8 +8,6 @@ import (
|
|||
"os"
|
||||
"runtime"
|
||||
"syscall"
|
||||
|
||||
"github.com/restic/restic/internal/fs"
|
||||
)
|
||||
|
||||
// fsyncDir flushes changes to the directory dir.
|
||||
|
@ -45,5 +43,5 @@ func isMacENOTTY(err error) bool {
|
|||
|
||||
// set file to readonly
|
||||
func setFileReadonly(f string, mode os.FileMode) error {
|
||||
return fs.Chmod(f, mode&^0222)
|
||||
return os.Chmod(f, mode&^0222)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue