Git - fix regression related to using path.sep (#269361)

This commit is contained in:
Ladislau Szomoru
2025-10-01 17:36:11 +02:00
committed by GitHub
parent 4b204542f2
commit d0cb4a16a5

View File

@@ -307,8 +307,9 @@ function normalizePath(path: string): string {
path = path.toLowerCase();
}
// Remove trailing separator
if (path.charAt(path.length - 1) === sep) {
// Trailing separator
if (/[/\\]$/.test(path)) {
// Remove trailing separator
path = path.substring(0, path.length - 1);
}