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 4eb8c73 commit 55d6e10Copy full SHA for 55d6e10
src/compiler/core.ts
@@ -434,7 +434,7 @@ module ts {
434
return path.replace(/\\/g, "/");
435
}
436
437
- // Returns length of path root (i.e. length of "/", "x:/", "//server/share/")
+ // Returns length of path root (i.e. length of "/", "x:/", "//server/share/, file:///user/files")
438
export function getRootLength(path: string): number {
439
if (path.charCodeAt(0) === CharacterCodes.slash) {
440
if (path.charCodeAt(1) !== CharacterCodes.slash) return 1;
@@ -448,6 +448,8 @@ module ts {
448
if (path.charCodeAt(2) === CharacterCodes.slash) return 3;
449
return 2;
450
451
+ let idx = path.indexOf('://');
452
+ if (idx !== -1) return idx + 3
453
return 0;
454
455
0 commit comments