summary refs log tree commit diff stats
path: root/compiler/pathutils.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/pathutils.nim')
-rw-r--r--compiler/pathutils.nim4
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:
amp;id=62946ff6c5712bebf7f07a83fc077d40db0e73a8'>62946ff ^
513e8aa ^
62946ff ^

2a09617 ^

62946ff ^
2a09617 ^







bfefaff ^















62946ff ^

2a09617 ^
023a262 ^

62946ff ^
513e8aa ^




023a262 ^


513e8aa ^

62946ff ^
513e8aa ^
62946ff ^

513e8aa ^







62946ff ^
513e8aa ^
62946ff ^
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73