fs: unexport Local and expose via NewLocal

This commit is contained in:
Michael Eischer committed 2026-06-13 19:50:49 +02:00
1 parent 1acc19dac5
commit e1e7fc8fb2
20 files changed
+72 -67

No files matched your search

+1 -1
View File
@@ -489,7 +489,7 @@ func (res *Restorer) removeUnexpectedFiles(ctx context.Context, target, location
panic("internal error")
}
entries, err := fs.Readdirnames(fs.Local{}, target, fs.O_NOFOLLOW)
entries, err := fs.Readdirnames(fs.NewLocal(), target, fs.O_NOFOLLOW)
if errors.Is(err, os.ErrNotExist) {
return nil
} else if err != nil {
+1 -1
View File
@@ -1537,7 +1537,7 @@ func TestRestorerLongPath(t *testing.T) {
repo := repository.TestRepository(t)
local := &fs.Local{}
local := fs.NewLocal()
sc := archiver.NewScanner(local)
rtest.OK(t, sc.Scan(context.TODO(), []string{tmp}))
arch := archiver.New(repo, local, archiver.Options{})