Skip to content

Commit

Permalink
fix issue #8349 FileSystemCaseSensitive should be false on OSX
Browse files Browse the repository at this point in the history
  • Loading branch information
timotheecour committed Jul 23, 2018
1 parent 6fc9506 commit d418d77
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lib/pure/ospaths.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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:
Expand Down

0 comments on commit d418d77

Please sign in to comment.