Skip to content

Commit e83e731

Browse files
authored
Merge pull request #233 from luotianqi777/fix_tar
fix: tar decomporess file not found
2 parents 88d76c0 + 48a673c commit e83e731

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)