Skip to content

Commit

Permalink
Merge pull request #233 from luotianqi777/fix_tar
Browse files Browse the repository at this point in the history
fix: tar decomporess file not found
  • Loading branch information
luotianqi777 authored Dec 25, 2023
2 parents 88d76c0 + 48a673c commit e83e731
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 e83e731

Please sign in to comment.