summary refs log tree commit diff stats
path: root/compiler/ndi.nim
diff options
context:
space:
mode:
Diffstat (limited to 'compiler/ndi.nim')
-rw-r--r--compiler/ndi.nim8
1 files changed, 4 insertions, 4 deletions
diff --git a/compiler/ndi.nim b/compiler/ndi.nim
index 9708c388d..f672b1b76 100644
--- a/compiler/ndi.nim
+++ b/compiler/ndi.nim
@@ -10,7 +10,7 @@
 ## This module implements the generation of ``.ndi`` files for better debugging
 ## support of Nim code. "ndi" stands for "Nim debug info".
 
-import ast, msgs, ropes, options
+import ast, msgs, ropes, options, pathutils
 
 type
   NdiFile* = object
@@ -30,10 +30,10 @@ proc doWrite(f: var NdiFile; s: PSym; conf: ConfigRef) =
 template writeMangledName*(f: NdiFile; s: PSym; conf: ConfigRef) =
   if f.enabled: doWrite(f, s, conf)
 
-proc open*(f: var NdiFile; filename: string; conf: ConfigRef) =
-  f.enabled = filename.len > 0
+proc open*(f: var NdiFile; filename: AbsoluteFile; conf: ConfigRef) =
+  f.enabled = not filename.isEmpty
   if f.enabled:
-    f.f = open(filename, fmWrite, 8000)
+    f.f = open(filename.string, fmWrite, 8000)
     f.buf = newStringOfCap(20)
 
 proc close*(f: var NdiFile) =