diff options
author | Aaron O'Mullan <aaron.omullan@gmail.com> | 2015-07-31 15:08:56 +0200 |
---|---|---|
committer | Aaron O'Mullan <aaron.omullan@gmail.com> | 2015-07-31 15:08:56 +0200 |
commit | d699dff872a36b33719385ddf8b641afdc5bada1 (patch) | |
tree | 46ee428353dd09a94fdf60c03d219d4fb24ee31e /lib/generator.js | |
parent | 501843d6243e0be3bcab0e7c9cc1b6ff2886d4f4 (diff) | |
download | gitbook-d699dff872a36b33719385ddf8b641afdc5bada1.zip gitbook-d699dff872a36b33719385ddf8b641afdc5bada1.tar.gz gitbook-d699dff872a36b33719385ddf8b641afdc5bada1.tar.bz2 |
Use Book.resolve when possible
For added consistency
Diffstat (limited to 'lib/generator.js')
-rw-r--r-- | lib/generator.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/generator.js b/lib/generator.js index c809de2..407afa5 100644 --- a/lib/generator.js +++ b/lib/generator.js @@ -36,7 +36,7 @@ BaseGenerator.prototype.convertFile = function(input) { // Copy file to the output (non parsable) BaseGenerator.prototype.transferFile = function(input) { return fs.copy( - path.join(this.book.root, input), + this.book.resolve(input), path.join(this.options.output, input) ); }; @@ -53,8 +53,8 @@ BaseGenerator.prototype.copyCover = function() { var that = this; return Q.all([ - fs.copy(path.join(that.book.root, "cover.jpg"), path.join(that.options.output, "cover.jpg")), - fs.copy(path.join(that.book.root, "cover_small.jpg"), path.join(that.options.output, "cover_small.jpg")) + fs.copy(that.book.resolve("cover.jpg"), path.join(that.options.output, "cover.jpg")), + fs.copy(that.book.resolve("cover_small.jpg"), path.join(that.options.output, "cover_small.jpg")) ]) .fail(function() { // If orignaly from multi-lang, try copy from parent |