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
3
internal/backend/cache/file_test.go
vendored
3
internal/backend/cache/file_test.go
vendored
|
@ -12,7 +12,6 @@ import (
|
|||
|
||||
"github.com/restic/restic/internal/backend"
|
||||
"github.com/restic/restic/internal/errors"
|
||||
"github.com/restic/restic/internal/fs"
|
||||
"github.com/restic/restic/internal/restic"
|
||||
rtest "github.com/restic/restic/internal/test"
|
||||
|
||||
|
@ -278,7 +277,7 @@ func TestFileSaveConcurrent(t *testing.T) {
|
|||
|
||||
func TestFileSaveAfterDamage(t *testing.T) {
|
||||
c := TestNewCache(t)
|
||||
rtest.OK(t, fs.RemoveAll(c.path))
|
||||
rtest.OK(t, os.RemoveAll(c.path))
|
||||
|
||||
// save a few bytes of data in the cache
|
||||
data := rtest.Random(123456789, 42)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue