Skip to content

Commit

Permalink
Merge pull request #2 from shiyou0130011/hotfix/1-特殊情況下的目錄無法正常處理
Browse files Browse the repository at this point in the history
改用 mkdirall 來處理新增資料夾的部分
  • Loading branch information
shiyou0130011 authored May 19, 2022
2 parents a9661aa + 0866845 commit d964141
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion book.go
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ func (i *Info) Compile() (err error) {
outDir := path.Join(i.OutputFolderPath, filepath.Dir(relativeFilePath))
if _, err := os.Stat(outDir); os.IsNotExist(err) {
log.Print("Create folder ", outDir)
os.Mkdir(outDir, os.ModeDir)
os.MkdirAll(outDir, os.ModeDir)
}

if path.Ext(relativeFilePath) == ".md" {
Expand Down

0 comments on commit d964141

Please sign in to comment.