Skip to content

Commit

Permalink
avoid dir error with Newer AozoraEpub3
Browse files Browse the repository at this point in the history
https://jbbs.shitaraba.net/bbs/read.cgi/computer/44668/1511245701/280
「AozoraEpub3は公式版作者が失踪したので↓を使用」

を見てその通りに作業し narou init したところ、以下が発生。対処のため、1行追加。

/xxx/narou-3.5.1/lib/extension.rb:30:in `mkdir': No such file or directory @ dir_s_mkdir - /xxx/AozoraEpub3/template/OPS/css_custom (Errno::ENOENT)

via #371
  • Loading branch information
whiteleaf7 committed Sep 10, 2022
1 parent 05fc06b commit a1527e7
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/extension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ def File.write(path, string, *options, mode: nil)
return super if mode

dirpath = File.dirname(path)
FileUtils.makedirs(dirpath) unless Dir.exist?(dirpath)
temp_path = File.join(dirpath, SecureRandom.hex(15))
if File.extname(path) == ".yaml" && File.basename(dirpath) != Downloader::SECTION_SAVE_DIR_NAME
backup = "#{path}.backup"
Expand Down

0 comments on commit a1527e7

Please sign in to comment.