summaryrefslogtreecommitdiff
path: root/io/path.tnsl
diff options
context:
space:
mode:
authorKai Gunger <kgunger12@gmail.com>2026-11-16 00:54:12 -0500
committerKai Gunger <kgunger12@gmail.com>2026-11-16 00:54:12 -0500
commit33c1bca9388f6c5501424bdd91a82b5819337c52 (patch)
tree927f811b14554cb3a4672993c8f869ade2ca536c /io/path.tnsl
parentbcc923602fbbcb50a35e7870aec6b26c96175c10 (diff)
fixes for file
Diffstat (limited to 'io/path.tnsl')
-rw-r--r--io/path.tnsl10
1 files changed, 7 insertions, 3 deletions
diff --git a/io/path.tnsl b/io/path.tnsl
index 5a71403..13fc574 100644
--- a/io/path.tnsl
+++ b/io/path.tnsl
@@ -12,6 +12,9 @@ uint8 PATH_SEP = '/'
self.strings.init(8)
~uint8 real = _realpath(path)
+ /; if (real == null)
+ return
+ ;/
box.List tmp
tmp.init(1)
@@ -45,13 +48,13 @@ uint8 PATH_SEP = '/'
return out.as_cstr()
;/
- ~uint8 str = self.strings.get(0)
- out.push_cstr(str)
+ ~~uint8 str = self.strings.get(0)
+ out.push_cstr(str`)
/; loop (int i = 1; i < self.strings.count) [i++]
str = self.strings.get(i)
out.push(~PATH_SEP)
- out.push_cstr(str)
+ out.push_cstr(str`)
;/
return out.as_cstr()
@@ -88,6 +91,7 @@ uint8 PATH_SEP = '/'
Path out
out.init(full)
+ return out
;/
/; end