diff options
Diffstat (limited to 'compiler/pathutils.nim')
-rw-r--r-- | compiler/pathutils.nim | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/compiler/pathutils.nim b/compiler/pathutils.nim index 7417845c0..cd6fb2a53 100644 --- a/compiler/pathutils.nim +++ b/compiler/pathutils.nim @@ -42,6 +42,10 @@ proc cmpPaths*(x, y: AbsoluteDir): int {.borrow.} proc createDir*(x: AbsoluteDir) {.borrow.} +proc toAbsoluteDir*(path: string): AbsoluteDir = + result = if path.isAbsolute: AbsoluteDir(path) + else: AbsoluteDir(getCurrentDir() / path) + proc `$`*(x: AnyPath): string = x.string when true: |