Skip to content

Commit 48a673c

Browse files
committed
fix: tar decomporess file not found
1 parent 88d76c0 commit 48a673c

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

opensca/walk/tar.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,7 @@ func xtar(ctx context.Context, filter ExtractFileFilter, input, output string) b
6161
continue
6262
}
6363

64+
os.MkdirAll(filepath.Dir(fp), 0777)
6465
fw, err := os.Create(fp)
6566
if err != nil {
6667
logs.Warn(err)
@@ -94,7 +95,6 @@ func xgz(input, output string) bool {
9495
defer fr.Close()
9596

9697
fp := filepath.Join(output, strings.TrimSuffix(filepath.Base(input), filepath.Ext(input)))
97-
os.MkdirAll(filepath.Dir(fp), 0777)
9898
fw, err := os.Create(fp)
9999
if err != nil {
100100
logs.Warn(err)

0 commit comments

Comments
 (0)