Skip to content

Commit

Permalink
fix relative path resolution after accidental file:/// prepend
Browse files Browse the repository at this point in the history
  • Loading branch information
blahah committed Apr 10, 2015
1 parent e6ad466 commit 0c22408
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/url.js
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ url.cleanResourcePath = function(path, pageUrl) {
} else if (/^file:\/\/\/?/i.test(path) ||
(/^\//.test(path))) {
// root relative path
var relative = path.replace(/^(file:)?\/+/gi, '');
var relative = path.replace(/^(file:)?\/+/gi, '/');
return nodeurl.resolve(pageUrl, relative)
} else {
return nodeurl.resolve(pageUrl, path);
Expand Down

0 comments on commit 0c22408

Please sign in to comment.