We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 88008a6 + 958f95d commit 7aaf30bCopy full SHA for 7aaf30b
1 file changed
source-map-support.js
@@ -66,7 +66,11 @@ retrieveFileHandlers.push(function(path) {
66
path = path.trim();
67
if (/^file:/.test(path)) {
68
// existsSync/readFileSync can't handle file protocol, but once stripped, it works
69
- path = path.replace(/file:\/\/(\w:\\|\/)/, '');
+ path = path.replace(/file:\/\/\/(\w:)?/, function(protocol, drive) {
70
+ return drive ?
71
+ '' : // file:///C:/dir/file -> C:/dir/file
72
+ '/'; // file:///root-dir/file -> /root-dir/file
73
+ });
74
}
75
if (path in fileContentsCache) {
76
return fileContentsCache[path];
0 commit comments