Skip to content

Commit ba1f519

Browse files
committed
slightly more
1 parent 3ed6a92 commit ba1f519

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

archive/fs/tar.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ import (
99
"github.com/spf13/afero/tarfs"
1010
)
1111

12-
func FromTar(r io.Reader) fs.FS {
12+
func FromTarReader(r io.Reader) fs.FS {
1313
tr := tar.NewReader(r)
1414
tfs := tarfs.New(tr)
1515
rofs := afero.NewReadOnlyFs(tfs)

coderd/files/cache.go

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,12 @@ import (
77
"sync"
88
"sync/atomic"
99

10+
"github.com/google/uuid"
11+
"golang.org/x/xerrors"
12+
1013
archivefs "github.com/coder/coder/v2/archive/fs"
1114
"github.com/coder/coder/v2/coderd/database"
1215
"github.com/coder/coder/v2/coderd/util/lazy"
13-
"github.com/google/uuid"
14-
"golang.org/x/xerrors"
1516
)
1617

1718
// NewFromStore returns a file cache that will fetch files from the provided
@@ -24,7 +25,7 @@ func NewFromStore(store database.Store) Cache {
2425
}
2526

2627
content := bytes.NewBuffer(file.Data)
27-
return archivefs.FromTar(content), nil
28+
return archivefs.FromTarReader(content), nil
2829
}
2930

3031
return Cache{

0 commit comments

Comments
 (0)