Co-Authored-By: Claude Opus 5 <[email protected]> Claude-Session: https://claude.ai/code/session_018Ae69wJS7sueQMUwNxV3nX
67 lines
1.9 KiB
Diff
67 lines
1.9 KiB
Diff
diff --git a/frontends/monkey/main.c b/frontends/monkey/main.c
|
|
index 463f0bea6..578d148e4 100644
|
|
--- a/frontends/monkey/main.c
|
|
+++ b/frontends/monkey/main.c
|
|
@@ -422,7 +422,12 @@ main(int argc, char **argv)
|
|
setbuf(stderr, NULL);
|
|
|
|
/* Prep the search paths */
|
|
+#if defined(__montauk__)
|
|
+ /* see NS_RESPATH_SEP: ':' is part of a MontaukOS drive path */
|
|
+ respaths = nsmonkey_init_resource("${HOME}/.netsurf/;${NETSURFRES};"MONKEY_RESPATH";./frontends/monkey/res");
|
|
+#else
|
|
respaths = nsmonkey_init_resource("${HOME}/.netsurf/:${NETSURFRES}:"MONKEY_RESPATH":./frontends/monkey/res");
|
|
+#endif
|
|
|
|
/* initialise logging. Not fatal if it fails but not much we can do
|
|
* about it either.
|
|
diff --git a/utils/filepath.c b/utils/filepath.c
|
|
index b87e2bf0d..9c4bcd34b 100644
|
|
--- a/utils/filepath.c
|
|
+++ b/utils/filepath.c
|
|
@@ -325,7 +325,7 @@ filepath_path_to_strvec(const char *path)
|
|
estart = eend = path;
|
|
|
|
while (strc < (MAX_RESPATH - 2)) {
|
|
- while ( (*eend != 0) && (*eend != ':') )
|
|
+ while ( (*eend != 0) && (*eend != NS_RESPATH_SEP) )
|
|
eend++;
|
|
elen = eend - estart;
|
|
|
|
@@ -339,7 +339,7 @@ filepath_path_to_strvec(const char *path)
|
|
}
|
|
|
|
/* skip colons */
|
|
- while (*eend == ':')
|
|
+ while (*eend == NS_RESPATH_SEP)
|
|
eend++;
|
|
|
|
/* check for termination */
|
|
diff --git a/utils/filepath.h b/utils/filepath.h
|
|
index 784264b33..469830a9d 100644
|
|
--- a/utils/filepath.h
|
|
+++ b/utils/filepath.h
|
|
@@ -24,6 +24,22 @@
|
|
#ifndef _NETSURF_UTILS_FILEPATH_H_
|
|
#define _NETSURF_UTILS_FILEPATH_H_
|
|
|
|
+/**
|
|
+ * Character separating elements of a resource path list.
|
|
+ *
|
|
+ * A colon cannot double as the list separator on platforms whose absolute
|
|
+ * paths already contain one -- MontaukOS names drives as "N:/dir", so
|
|
+ * "0:/os/netsurf/" would split into "0" and "/os/netsurf/", neither of which
|
|
+ * resolves.
|
|
+ */
|
|
+#ifndef NS_RESPATH_SEP
|
|
+#if defined(__montauk__)
|
|
+#define NS_RESPATH_SEP ';'
|
|
+#else
|
|
+#define NS_RESPATH_SEP ':'
|
|
+#endif
|
|
+#endif
|
|
+
|
|
#include <stdarg.h>
|
|
|
|
#include "utils/errors.h"
|