diff --git a/src/compiler/path.ts b/src/compiler/path.ts index 429c9089c1f58..911398a07a0c2 100644 --- a/src/compiler/path.ts +++ b/src/compiler/path.ts @@ -658,7 +658,7 @@ namespace ts { //// Path Comparisons // check path for these segments: '', '.'. '..' - const relativePathSegmentRegExp = /(^|\/)\.{0,2}($|\/)/; + const relativePathSegmentRegExp = /(?:\/\/)|(?:^|\/)\.\.?(?:$|\/)/; function comparePathsWorker(a: string, b: string, componentComparer: (a: string, b: string) => Comparison) { if (a === b) return Comparison.EqualTo;