Skip to content

Commit 88d76c0

Browse files
authored
Merge pull request #232 from luotianqi777/fix_rar
fix: rar decompress file not found
2 parents 9f4faaa + 5358356 commit 88d76c0

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

opensca/walk/rar.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ func xrar(ctx context.Context, filter ExtractFileFilter, input, output string) b
5151
continue
5252
}
5353

54+
os.MkdirAll(filepath.Dir(fp), 0777)
5455
fw, err := os.Create(fp)
5556
if err != nil {
5657
logs.Warn(err)

opensca/walk/tar.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ func xgz(input, output string) bool {
9494
defer fr.Close()
9595

9696
fp := filepath.Join(output, strings.TrimSuffix(filepath.Base(input), filepath.Ext(input)))
97+
os.MkdirAll(filepath.Dir(fp), 0777)
9798
fw, err := os.Create(fp)
9899
if err != nil {
99100
logs.Warn(err)

0 commit comments

Comments
 (0)