Skip to content

Commit

Permalink
fix: tar decomporess file not found
Browse files Browse the repository at this point in the history
  • Loading branch information
luotianqi777 committed Dec 25, 2023
1 parent 88d76c0 commit 48a673c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion opensca/walk/tar.go
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ func xtar(ctx context.Context, filter ExtractFileFilter, input, output string) b
continue
}

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

fp := filepath.Join(output, strings.TrimSuffix(filepath.Base(input), filepath.Ext(input)))
os.MkdirAll(filepath.Dir(fp), 0777)
fw, err := os.Create(fp)
if err != nil {
logs.Warn(err)
Expand Down

0 comments on commit 48a673c

Please sign in to comment.