summaryrefslogtreecommitdiffstats
path: root/lib/template.js
diff options
context:
space:
mode:
authorAaron O'Mullan <aaron.omullan@gmail.com>2015-07-31 15:08:56 +0200
committerAaron O'Mullan <aaron.omullan@gmail.com>2015-07-31 15:08:56 +0200
commitd699dff872a36b33719385ddf8b641afdc5bada1 (patch)
tree46ee428353dd09a94fdf60c03d219d4fb24ee31e /lib/template.js
parent501843d6243e0be3bcab0e7c9cc1b6ff2886d4f4 (diff)
downloadgitbook-d699dff872a36b33719385ddf8b641afdc5bada1.zip
gitbook-d699dff872a36b33719385ddf8b641afdc5bada1.tar.gz
gitbook-d699dff872a36b33719385ddf8b641afdc5bada1.tar.bz2
Use Book.resolve when possible
For added consistency
Diffstat (limited to 'lib/template.js')
-rw-r--r--lib/template.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/template.js b/lib/template.js
index bc3e53e..b31fab9 100644
--- a/lib/template.js
+++ b/lib/template.js
@@ -24,7 +24,7 @@ var BookLoader = nunjucks.Loader.extend({
git.resolveFile(fileurl)
.then(function(filepath) {
// Is local file
- if (!filepath) filepath = path.resolve(that.book.root, fileurl);
+ if (!filepath) filepath = that.book.resolve(fileurl);
else that.book.log.debug.ln("resolve from git", fileurl, "to", filepath)
// Read file from absolute path