Fix how relativePath handle case sensitiviy (#12312) [backport]

This commit is contained in:
Tomohiro 2019-10-01 16:09:59 +09:00 • committed by Andreas Rumpf
commit 64d5e25821
2 changed files with 6 additions and 2 deletions

View file

@ -232,9 +232,9 @@ proc splitPath*(path: string): tuple[head, tail: string] {.
result.tail = path
when FileSystemCaseSensitive:
template `!=?`(a, b: char): bool = toLowerAscii(a) != toLowerAscii(b)
else:
template `!=?`(a, b: char): bool = a != b
else:
template `!=?`(a, b: char): bool = toLowerAscii(a) != toLowerAscii(b)
proc relativePath*(path, base: string; sep = DirSep): string {.
noSideEffect, rtl, extern: "nos$1", raises: [].} =