Skip to content

Commit

Permalink
unpack: create dirs along the way
Browse files Browse the repository at this point in the history
  • Loading branch information
chrsm committed Dec 29, 2022
1 parent 11b70e1 commit 2a6f570
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions cmd/arpy/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ var (
dst := filepath.Join(out, idx.Name)

logf(1, "%s -> %s", idx.Name, dst)

os.MkdirAll(filepath.Dir(dst), 0744)

dfp, err := os.OpenFile(dst, os.O_CREATE|os.O_TRUNC|os.O_WRONLY, 0644)
if err != nil {
return fmt.Errorf("could not write %s to %s", idx.Name, dst)
Expand Down

0 comments on commit 2a6f570

Please sign in to comment.