Skip to content

Commit

Permalink
Merge pull request #401 from kdmsnr/fix-bug-path-with-space
Browse files Browse the repository at this point in the history
Escape pathname to prevent epubmaker from making files in different path
  • Loading branch information
kdmsnr committed Mar 1, 2015
2 parents 34ddcba + 5738615 commit ba64f73
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/epubmaker/epubcommon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
require 'epubmaker/producer'
require 'review/i18n'
require 'cgi'
require 'shellwords'

module EPUBMaker

Expand Down Expand Up @@ -411,8 +412,8 @@ def produce_write_common(basedir, tmpdir)
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.shellescape} mimetype` }
Dir.chdir(tmpdir) {|d| `#{@producer.params["epubmaker"]["zip_stage2"]} #{epubfile.shellescape} META-INF OEBPS #{@producer.params["epubmaker"]["zip_addpath"]}` }
end

def legacy_cover_and_title_file(loadfile, writefile)
Expand Down

0 comments on commit ba64f73

Please sign in to comment.