Skip to content

Commit ce22f54

Browse files
authored
fix: create temp file under composite fs dir (#9387)
1 parent db19b34 commit ce22f54

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkg/fanal/analyzer/fs.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ func NewCompositeFS() (*CompositeFS, error) {
3636
func (c *CompositeFS) CopyFileToTemp(opener Opener, _ os.FileInfo) (string, error) {
3737
// Create a temporary file to which the file in the layer will be copied
3838
// so that all the files will not be loaded into memory
39-
f, err := xos.CreateTemp("", "analyzer-file-")
39+
f, err := xos.CreateTemp(c.dir, "analyzer-file-")
4040
if err != nil {
4141
return "", xerrors.Errorf("create temp error: %w", err)
4242
}

0 commit comments

Comments
 (0)