From 15b18bab8c392126e15d37dbed529e2caba99d15 Mon Sep 17 00:00:00 2001 From: Jeff Williams Date: Tue, 5 Nov 2013 21:30:28 -0800 Subject: [PATCH] resolve resource file paths relative to working directory (#516) --- lib/jsdoc/path.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/jsdoc/path.js b/lib/jsdoc/path.js index e72d19e0..0c1a3849 100644 --- a/lib/jsdoc/path.js +++ b/lib/jsdoc/path.js @@ -117,9 +117,9 @@ exports.getResourcePath = function(filepath, filename) { return true; } - // first, try resolving it relative to the current working directory (or just normalize it - // if it's an absolute path) - result = path.resolve(filepath); + // first, try resolving it relative to the working directory (or just normalize it if it's an + // absolute path) + result = path.resolve(process.env.PWD, filepath); if ( !pathExists(result) ) { // next, try resolving it relative to the JSDoc directory result = path.resolve(env.dirname, filepath);