diff options
Diffstat (limited to 'lib/generator.js')
-rw-r--r-- | lib/generator.js | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/generator.js b/lib/generator.js index d0db3b6..32ce3b5 100644 --- a/lib/generator.js +++ b/lib/generator.js @@ -46,16 +46,16 @@ BaseGenerator.prototype.copyCover = function() { var that = this; return Q.all([ - fs.copy(path.join(this.options.input, "cover.jpg"), path.join(this.options.output, "cover.jpg")), - fs.copy(path.join(this.options.input, "cover_small.jpg"), path.join(this.options.output, "cover_small.jpg")) + fs.copy(path.join(this.book.root, "cover.jpg"), path.join(this.options.output, "cover.jpg")), + fs.copy(path.join(this.book.root, "cover_small.jpg"), path.join(this.options.output, "cover_small.jpg")) ]) .fail(function() { - // If orignally from multi-lang, try copy from originalInput - if (!that.options.originalInput) return; + // If orignaly from multi-lang, try copy from parent + if (!that.isMultilingual()) return; return Q.all([ - fs.copy(path.join(that.options.originalInput, "cover.jpg"), path.join(that.options.output, "cover.jpg")), - fs.copy(path.join(that.options.originalInput, "cover_small.jpg"), path.join(that.options.output, "cover_small.jpg")) + fs.copy(path.join(that.book.parentRoot(), "cover.jpg"), path.join(that.options.output, "cover.jpg")), + fs.copy(path.join(that.book.parentRoot(), "cover_small.jpg"), path.join(that.options.output, "cover_small.jpg")) ]); }) .fail(function(err) { |