--- /dev/null
+diff -Nru lynx2-8-5/src/LYUtils.c lynx2-8-5.new/src/LYUtils.c
+--- lynx2-8-5/src/LYUtils.c Thu Dec 19 01:57:10 2002
++++ lynx2-8-5.new/src/LYUtils.c Mon Mar 10 14:32:58 2003
+@@ -5126,7 +5126,9 @@
+ char *, fname)
+ {
+ char *home = NULL;
++ char *config_dir = getenv("CONFIG_DIR");
+ char *file = fname;
++ char *file2 = NULL;
+ int len;
+
+ /*
+@@ -5149,13 +5151,39 @@
+ /*
+ * Set up home string and length. - FM
+ */
+- StrAllocCopy(home, Home_Dir());
+-
+ #ifdef VMS
+ #define NO_HOMEPATH "Error:"
+ #else
+ #define NO_HOMEPATH "/error"
+ #endif /* VMS */
++
++ if (config_dir) {
++ StrAllocCopy(home, config_dir);
++ if (!non_empty(config_dir))
++ /*
++ * Home_Dir() has a bug if this ever happens. - FM
++ */
++ StrAllocCopy(config_dir, NO_HOMEPATH);
++
++ len = fbuffer_size - (strlen(config_dir) + 1);
++ if (len <= 0) {
++ /*
++ * Buffer is smaller than or only big enough for the home path.
++ * Load what fits of the home path and return. This will fail,
++ * but we need something in the buffer. - FM
++ */
++ LYstrncpy(fbuffer, config_dir, (fbuffer_size - 1));
++ return;
++ }
++ /*
++ * Check whether we have a subdirectory path or just a filename. - FM
++ */
++ file2 = (strncmp(file, "./", 2) ? file : file + 2);
++ sprintf(fbuffer, "%s/%.*s", config_dir, len,
++ (strncmp(file2, ".", 1) ? file2 : (file2+1)));
++ } else {
++ StrAllocCopy(home, Home_Dir());
++
+ if (!non_empty(home))
+ /*
+ * Home_Dir() has a bug if this ever happens. - FM
+@@ -5213,6 +5241,7 @@
+ (strncmp(file, "./", 2) ? file : (file + 2)));
+ #endif /* VMS */
+ FREE(home);
++ }
+ }
+
+ /*