careful with path comparisons on windows

related to #50760
This commit is contained in:
Joao Moreno
2018-05-30 09:21:46 +02:00
parent d49246788f
commit 98601ceb2c
3 changed files with 14 additions and 4 deletions

View File

@@ -324,3 +324,13 @@ export function isDescendant(parent: string, descendant: string): boolean {
return descendant.startsWith(parent);
}
export function pathEquals(a: string, b: string): boolean {
// Windows is case insensitive
if (isWindowsPath(a)) {
a = a.toLowerCase();
b = b.toLowerCase();
}
return a === b;
}