File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change 9
9
"github.com/spf13/afero/tarfs"
10
10
)
11
11
12
- func FromTar (r io.Reader ) fs.FS {
12
+ func FromTarReader (r io.Reader ) fs.FS {
13
13
tr := tar .NewReader (r )
14
14
tfs := tarfs .New (tr )
15
15
rofs := afero .NewReadOnlyFs (tfs )
Original file line number Diff line number Diff line change @@ -7,11 +7,12 @@ import (
7
7
"sync"
8
8
"sync/atomic"
9
9
10
+ "github.com/google/uuid"
11
+ "golang.org/x/xerrors"
12
+
10
13
archivefs "github.com/coder/coder/v2/archive/fs"
11
14
"github.com/coder/coder/v2/coderd/database"
12
15
"github.com/coder/coder/v2/coderd/util/lazy"
13
- "github.com/google/uuid"
14
- "golang.org/x/xerrors"
15
16
)
16
17
17
18
// NewFromStore returns a file cache that will fetch files from the provided
@@ -24,7 +25,7 @@ func NewFromStore(store database.Store) Cache {
24
25
}
25
26
26
27
content := bytes .NewBuffer (file .Data )
27
- return archivefs .FromTar (content ), nil
28
+ return archivefs .FromTarReader (content ), nil
28
29
}
29
30
30
31
return Cache {
You can’t perform that action at this time.
0 commit comments