summary refs log tree commit diff stats
path: root/lib/pure
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2013-09-24 09:27:00 +0200
committerAraq <rumpf_a@web.de>2013-09-24 09:27:00 +0200
commitc11398ea0d32640012946d7555750b3f3ea7fc0e (patch)
tree24be70e479a1cbd9aa0fc5aae983f7c448cb7841 /lib/pure
parent05d12897a2cc8d8cc4231d8648d7dd954da0f758 (diff)
downloadNim-c11398ea0d32640012946d7555750b3f3ea7fc0e.tar.gz
bugfix: typos in os.nim
Diffstat (limited to 'lib/pure')
-rw-r--r--lib/pure/os.nim6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/pure/os.nim b/lib/pure/os.nim
index 886823350..a39ca7b83 100644
--- a/lib/pure/os.nim
+++ b/lib/pure/os.nim
@@ -598,11 +598,11 @@ iterator parentDirs*(path: string, fromRoot=false, inclusive=true): string =
 proc `/../` * (head, tail: string): string {.noSideEffect.} =
   ## The same as ``parentDir(head) / tail`` unless there is no parent directory.
   ## Then ``head / tail`` is performed instead.
-  let sepPos = parentDirPos(path)
+  let sepPos = parentDirPos(head)
   if sepPos >= 0:
-    result = substr(path, 0, sepPos-1) / tail
+    result = substr(head, 0, sepPos-1) / tail
   else:
-    result = path / tail
+    result = head / tail
 
 proc normExt(ext: string): string =
   if ext == "" or ext[0] == extSep: result = ext # no copy needed here