From e66c4dfd9f0d1f4da6839b83992a5fe10a1f7dbe Mon Sep 17 00:00:00 2001 From: Robert Jackson Date: Fri, 7 Oct 2016 11:28:37 -0400 Subject: [PATCH] Use posix paths for dealing with modules. Let the underlying subsystem deal with the `path.sep` differences, the logic here was incorrectly interchanging `\` and `/` on windows. --- index.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/index.js b/index.js index 82f71b60..b960a316 100644 --- a/index.js +++ b/index.js @@ -129,8 +129,9 @@ module.exports = { * @param {String} relativePath - path to file within current app * @returns {Boolean} whether or not the file exists within the current app */ - _doesFileExistIsCurrentProjectAddonModule: function(relativePath) { - relativePath = path.join('addon', relativePath.replace(path.join('modules', this._parentName()),'')); + _doesFileExistIsCurrentProjectAddonModule: function(_relativePath) { + var relativePathWithoutProjectNamePrefix = _relativePath.replace('modules' + '/' + this._parentName(), ''); + var relativePath = 'addon/' + relativePathWithoutProjectNamePrefix; if (this._existsSync(relativePath)) { return true;