fix issue #8349 FileSystemCaseSensitive should be false on OSX (#8411)

This commit is contained in:
Timothee Cour
2018-07-23 17:26:49 -07:00
committed by Varriount
parent 9249276db0
commit 13df807576

View File

@@ -147,7 +147,7 @@ else: # UNIX-like operating system
DirSep* = '/'
AltSep* = DirSep
PathSep* = ':'
FileSystemCaseSensitive* = true
FileSystemCaseSensitive* = when defined(macosx): false else: true
ExeExt* = ""
ScriptExt* = ""
DynlibFormat* = when defined(macosx): "lib$1.dylib" else: "lib$1.so"
@@ -410,6 +410,11 @@ proc cmpPaths*(pathA, pathB: string): int {.
## | 0 iff pathA == pathB
## | < 0 iff pathA < pathB
## | > 0 iff pathA > pathB
runnableExamples:
when defined(macosx):
doAssert cmpPaths("foo", "Foo") == 0
elif defined(posix):
doAssert cmpPaths("foo", "Foo") > 0
if FileSystemCaseSensitive:
result = cmp(pathA, pathB)
else: