From e5a0fd6af4296f76987530a9566eb019307fa8bf Mon Sep 17 00:00:00 2001 From: bptato Date: Fri, 1 Dec 2023 21:24:34 +0100 Subject: config: better path handling; fix array parsing bug * Paths are now parsed through an unified code path with some useful additions like environment variable substitution. * Fix a bug in parseConfigValue where strings would be appended to existing arrays (and not override them). * Fix beforeLast calling afterLast for some reason. * Add a default CGI directory. --- src/utils/twtstr.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/utils') diff --git a/src/utils/twtstr.nim b/src/utils/twtstr.nim index 8372e588..9e40b920 100644 --- a/src/utils/twtstr.nim +++ b/src/utils/twtstr.nim @@ -237,7 +237,7 @@ func beforeLast*(s: string, c: set[char], n = 1): string = return s.substr(0, i) return s -func beforeLast*(s: string, c: char, n = 1): string = s.afterLast({c}, n) +func beforeLast*(s: string, c: char, n = 1): string = s.beforeLast({c}, n) proc c_sprintf(buf, fm: cstring): cint {.header: "", importc: "sprintf", varargs} -- cgit 1.4.1-2-gfad0