We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c3a8f5a commit 87ed8c0Copy full SHA for 87ed8c0
lib/util.js
@@ -225,7 +225,7 @@ function join(aRoot, aPath) {
225
return urlGenerate(aRootUrl);
226
}
227
228
- const joined = aPath.charAt(0) === "/"
+ const joined = exports.isAbsolute(aPath.charAt(0))
229
? aPath
230
: normalize(aRoot.replace(/\/+$/, "") + "/" + aPath);
231
@@ -238,7 +238,9 @@ function join(aRoot, aPath) {
238
exports.join = join;
239
240
exports.isAbsolute = function(aPath) {
241
- return aPath.charAt(0) === "/" || urlRegexp.test(aPath);
+ return aPath[0] === "/" ||
242
+ (aPath[1] === ":" && (aPath[2] === "\\" || aPath[2] === "/")) ||
243
+ urlRegexp.test(aPath);
244
};
245
246
/**
0 commit comments