diff options
Diffstat (limited to 'lib/book.js')
-rw-r--r-- | lib/book.js | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/lib/book.js b/lib/book.js index cb00ab1..93c9486 100644 --- a/lib/book.js +++ b/lib/book.js @@ -614,12 +614,13 @@ Book.prototype.findFile = function(filename) { var filepath = basename+ext; - return that.fileExists(filepath) - .then(function(exists) { - if (!exists) return null; + return fs.findFile(that.root, filepath) + .then(function(realFilepath) { + if (!realFilepath) return null; + return { parser: parsers.get(ext), - path: filepath + path: realFilepath }; }); }); |