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:
Michael Eischer 2024-07-21 15:22:21 +02:00
parent ca1e5e10b6
commit 24f4e780f1
9 changed files with 33 additions and 50 deletions

View file

@ -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)