Skip to content

Commit c7aa19f

Browse files
authored
paths.nim: Fix import for FreeBSD (#238)
1 parent 42f4cbc commit c7aa19f

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/nimib/paths.nim

+5-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
1-
import "$nim/compiler/pathutils"
1+
when defined(FreeBSD):
2+
import "$nim/lib/compiler/pathutils"
3+
else:
4+
import "$nim/compiler/pathutils"
25
export pathutils
36
import os, strutils, hashes
47

@@ -53,4 +56,4 @@ template withDir*(dir: AbsoluteDir, body: untyped): untyped =
5356
proc getExt*(filename: string): string =
5457
let i = filename.searchExtPos
5558
if i > 0 and filename.len > i:
56-
result = filename[(i+1) .. ^1]
59+
result = filename[(i+1) .. ^1]

0 commit comments

Comments
 (0)