From 046f4408282071640fae64bb798ee1e227bace27 Mon Sep 17 00:00:00 2001 From: Gordeev Boris Date: Sat, 28 Apr 2018 12:11:22 +0300 Subject: [PATCH] Fix an issue where on POSIX-like filesystems first '/' in absolute file path would be lost. --- mockserver.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mockserver.js b/mockserver.js index 29be3b8..02fd1cc 100644 --- a/mockserver.js +++ b/mockserver.js @@ -74,7 +74,7 @@ var parse = function (content, file) { body = body.replace(/^#import (.*);/m, function (includeStatement, file, data) { var importThisFile = file.replace(/['"]/g, ''); - return fs.readFileSync(path.join('./', context, importThisFile)); + return fs.readFileSync(path.join(context, importThisFile)); }) .replace(/\r\n?/g, '\n'); }