Skip to content

Commit

Permalink
[bug] joinPath2
Browse files Browse the repository at this point in the history
  • Loading branch information
Keisuke Izumiya committed Oct 8, 2024
1 parent 637ad6b commit 469ff0c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/pon2/private/misc.nim
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,11 @@ func joinPath2(head, tail: string): string {.inline.} =

proc getPon2RootDir(): string {.inline.} =
## Returns the root directory of Pon2.
let (head, tail) = currentSourcePath().splitPath2.head.splitPath2.head.splitPath2
let
(head, tail) = currentSourcePath().splitPath2.head.splitPath2.head.splitPath2
(head2, tail2) = head.splitPath2

result = if tail == "src": head.splitPath2.head else: head
result = if tail2 == "src": head2 else: head

const
Pon2RootDir* = getPon2RootDir()
Expand Down

0 comments on commit 469ff0c

Please sign in to comment.