summaryrefslogtreecommitdiff
path: root/libstd
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-04-12 19:22:56 -0700
committerOri Bernstein <ori@eigenstate.org>2015-04-12 19:22:56 -0700
commitbfa88ef5986d6054bcac17227b95f6dbf42b88db (patch)
tree4b260c5d7201d19ff6a43dc724af94eebf7d2c57 /libstd
parent26c079c597e55b7a0acfedd3d321809b9b180995 (diff)
downloadmc-bfa88ef5986d6054bcac17227b95f6dbf42b88db.tar.gz
Fix std.pathnorm for empty strings.
The normalized version of "" should be ".", not "/". Make it so.
Diffstat (limited to 'libstd')
-rw-r--r--libstd/pathjoin.myr4
1 files changed, 3 insertions, 1 deletions
diff --git a/libstd/pathjoin.myr b/libstd/pathjoin.myr
index 8d57507..69d020b 100644
--- a/libstd/pathjoin.myr
+++ b/libstd/pathjoin.myr
@@ -20,7 +20,9 @@ const pathcat = {a, b
const pathjoin = {l
var p, q
- p = strjoin(l, "/")
+ if l.len > 0
+ p = strjoin(l, "/")
+ ;;
q = pathnorm(p)
slfree(p)
-> q