Handle normalized windows paths in resource map

Fixes #86433

During path normalization, we convert `\` in windows paths to  `/`. This causes the isWindowsPath check to fail

I think it is generally safe to assume that file paths that start with a drive letter and then any type of slash should be treated as windows paths
This commit is contained in:
Matt Bierner 2019-12-05 15:05:35 -08:00
parent 9752af2c5c
commit 9bdb4a2f70

View file

@ -101,5 +101,5 @@ export class ResourceMap<T> {
}
export function isWindowsPath(path: string): boolean {
return /^[a-zA-Z]:\\/.test(path);
return /^[a-zA-Z]:[\/\\]/.test(path);
}