about summary refs log tree commit diff stats
path: root/src/utils/twtstr.nim
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2022-01-25 16:40:55 +0100
committerbptato <nincsnevem662@gmail.com>2022-01-25 16:40:55 +0100
commit8fb2b9a0a505a9051bac04ab0163b20db95b86fb (patch)
treed291a0da551a2682d3b6fef06daa81b173521702 /src/utils/twtstr.nim
parent16fa06be2a19780759195251c4a1f242ee0f8d10 (diff)
downloadchawan-8fb2b9a0a505a9051bac04ab0163b20db95b86fb.tar.gz
Fix some path bugs and misc. warnings
Diffstat (limited to 'src/utils/twtstr.nim')
-rw-r--r--src/utils/twtstr.nim5
1 files changed, 1 insertions, 4 deletions
diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim
index e2d06535..a0dd1b3f 100644
--- a/src/utils/twtstr.nim
+++ b/src/utils/twtstr.nim
@@ -128,9 +128,6 @@ func toAsciiLower*(str: string): string =
   for i in 0..str.high:
     result[i] = str[i].tolower()
 
-func getrune(s: string): Rune =
-  return s.toRunes()[0]
-
 func genHexCharMap(): seq[int] =
   for i in 0..255:
     case chr(i)
@@ -565,7 +562,7 @@ proc expandPath*(path: string): string =
         while path[i] != '/':
           usr &= path[i]
           inc i
-        let p = getpwnam(usr)
+        let p = getpwnam(cstring(usr))
         if p != nil:
           result = $p.pw_dir / path.substr(i)