Skip to content

Commit

Permalink
fix(save): fix auto create base dir
Browse files Browse the repository at this point in the history
  • Loading branch information
zhangtian committed Oct 25, 2022
1 parent 18fac59 commit 9e1e6e5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,8 @@ func main() {
if filename == "" {
filename = tp + "_doc.md"
}
_ = os.MkdirAll(filepath.Dir(filename), 0755)

log.Printf("start to save to %s\n", filename)
_ = os.WriteFile(filename, data, 0655)
}
Expand Down

0 comments on commit 9e1e6e5

Please sign in to comment.