summaryrefslogtreecommitdiffstats
path: root/txr.c
diff options
context:
space:
mode:
Diffstat (limited to 'txr.c')
-rw-r--r--txr.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/txr.c b/txr.c
index 46d0f63e..b6e14f24 100644
--- a/txr.c
+++ b/txr.c
@@ -290,6 +290,7 @@ static val sysroot(val target)
static void sysroot_init(void)
{
val prog_dir;
+ const wchar_t *psc = wref(coerce(const wchar_t *, path_sep_chars));
#if HAVE_WINDOWS_H
val slash = regex_compile(lit("\\\\"), nil);
@@ -301,6 +302,9 @@ static void sysroot_init(void)
#endif
prog_dir = dir_name(prog_path);
+ if (ref(prog_dir, negone) != chr(psc[0]))
+ prog_dir = format(nil, lit("~a~a"), prog_dir, chr(psc[0]), nao);
+
if (!(maybe_sysroot(lit(TXR_REL_PATH)) ||
maybe_sysroot(lit(TXR_REL_PATH EXE_SUFF)) ||
maybe_sysroot(lit(PROG_NAME)) ||