summary refs log tree commit diff stats
path: root/compiler/packagehandling.nim
diff options
context:
space:
mode:
authorAndreas Rumpf <rumpf_a@web.de>2018-09-07 01:53:09 +0200
committerAndreas Rumpf <rumpf_a@web.de>2018-09-07 01:53:09 +0200
commitad9db5cb1aab17d12bc0ed20a1ed0548e351b3db (patch)
treebe7af65d131263d1fd619a4e656a1205a871739b /compiler/packagehandling.nim
parent92863c0e75d32bffb0d7af15310e04cca7da9d3a (diff)
downloadNim-ad9db5cb1aab17d12bc0ed20a1ed0548e351b3db.tar.gz
compiler refactoring; use typesafe path handing; docgen: render symbols between modules
Diffstat (limited to 'compiler/packagehandling.nim')
-rw-r--r--compiler/packagehandling.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/compiler/packagehandling.nim b/compiler/packagehandling.nim
index 7414aeb71..f94c3d72c 100644
--- a/compiler/packagehandling.nim
+++ b/compiler/packagehandling.nim
@@ -41,10 +41,10 @@ proc getPackageName*(conf: ConfigRef; path: string): string =
     dec parents
     if parents <= 0: break
 
-proc withPackageName*(conf: ConfigRef; path: string): string =
-  let x = getPackageName(conf, path)
+proc withPackageName*(conf: ConfigRef; path: AbsoluteFile): AbsoluteFile =
+  let x = getPackageName(conf, path.string)
   if x.len == 0:
     result = path
   else:
     let (p, file, ext) = path.splitFile
-    result = (p / (x & '_' & file)) & ext
+    result = p / RelativeFile((x & '_' & file) & ext)