Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

プロジェクト名にスペースが入るとepubmakerの挙動がおかしくなる #398

Closed
suzukin opened this issue Feb 28, 2015 · 5 comments
Milestone

Comments

@suzukin
Copy link

suzukin commented Feb 28, 2015

リリース日にすみません、、スペース入れるなって話かもですが一応ご報告まで。

/XXXX YY
というフォルダー名のプロジェクトがあったとして、

/XXXX YY 配下で review-epubmaker config.yml を実行すると
/XXXX YY と同じ階層に XXXX.zip として生成されます。

@takahashim
Copy link
Collaborator

これは「スペース入れるな」というか文字種別チェックを入れた方が良さそうですね…。
明日以降に対応させていただきたく 🙇

@takahashim takahashim added this to the 1.6.0 milestone Feb 28, 2015
@suzukin
Copy link
Author

suzukin commented Feb 28, 2015

よろしくお願いします!

@kdmsnr
Copy link
Collaborator

kdmsnr commented Mar 1, 2015

とりあえず " で囲ってみましたが…… " が含まれるプロジェクトのときに別のところでコケますね。

diff --git a/lib/epubmaker/epubcommon.rb b/lib/epubmaker/epubcommon.rb
index f2feb5d..22b0b5f 100644
--- a/lib/epubmaker/epubcommon.rb
+++ b/lib/epubmaker/epubcommon.rb
@@ -411,8 +411,8 @@ EOT
     end

     def export_zip(tmpdir, epubfile)
-      Dir.chdir(tmpdir) {|d| `#{@producer.params["epubmaker"]["zip_stage1"]} #{epubfile} mimetype` }
-      Dir.chdir(tmpdir) {|d| `#{@producer.params["epubmaker"]["zip_stage2"]} #{epubfile} META-INF OEBPS #{@producer.params["epubmaker"]["zip_addpath"]}` }
+      Dir.chdir(tmpdir) {|d| `#{@producer.params["epubmaker"]["zip_stage1"]} "#{epubfile}" mimetype` }
+      Dir.chdir(tmpdir) {|d| `#{@producer.params["epubmaker"]["zip_stage2"]} "#{epubfile}" META-INF OEBPS #{@producer.params["epubmaker"]["zip_addpath"]}` }
     end

     def legacy_cover_and_title_file(loadfile, writefile)

@kdmsnr
Copy link
Collaborator

kdmsnr commented Mar 1, 2015

あ、shellescapeってのがあるんですね……知らなかった。それ使えばよさそう。

@takahashim
Copy link
Collaborator

あ、でも、この対応を入れても今後のバージョンで空白文字がNGになる可能性はあるのでご了承ください 🙇 > @suzukin

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants