Skip to content

Commit

Permalink
paths.nim: Fix import for FreeBSD (#238)
Browse files Browse the repository at this point in the history
  • Loading branch information
lbartoletti authored Mar 15, 2024
1 parent 42f4cbc commit c7aa19f
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/nimib/paths.nim
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
import "$nim/compiler/pathutils"
when defined(FreeBSD):
import "$nim/lib/compiler/pathutils"
else:
import "$nim/compiler/pathutils"
export pathutils
import os, strutils, hashes

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

0 comments on commit c7aa19f

Please sign in to comment.