44 lines
1.2 KiB
Diff
44 lines
1.2 KiB
Diff
--- lynx2-8-7/src/LYMain.c.orig 2009-07-06 01:52:33.000000000 +0200
|
|
+++ lynx2-8-7/src/LYMain.c 2010-01-03 14:58:31.000000000 +0100
|
|
@@ -967,6 +967,7 @@
|
|
struct stat dir_info;
|
|
char filename[LY_MAXPATH];
|
|
BOOL LYGetStdinArgs = FALSE;
|
|
+ struct stat st;
|
|
|
|
#ifdef _WINDOWS
|
|
WSADATA WSAData;
|
|
@@ -1209,6 +1210,21 @@
|
|
#endif
|
|
LYTildeExpand(&lynx_temp_space, TRUE);
|
|
|
|
+
|
|
+ if (stat(lynx_temp_space, &st) < 0) {
|
|
+ if (errno = ENOENT) {
|
|
+ printf("Creating dir %s\n", lynx_temp_space);
|
|
+ mkdir(lynx_temp_space, 0700);
|
|
+ }
|
|
+ }
|
|
+
|
|
+ if (stat(lynx_temp_space, &st) < 0) {
|
|
+ if (errno = ENOENT) {
|
|
+ printf("Can't create %s, let's try /tmp/\n", lynx_temp_space);
|
|
+ lynx_temp_space = "/tmp/";
|
|
+ }
|
|
+ }
|
|
+
|
|
if ((cp = strstr(lynx_temp_space, "$USER")) != NULL) {
|
|
char *cp1;
|
|
|
|
--- lynx2-8-7/userdefs.h.orig 2010-01-03 14:58:31.000000000 +0100
|
|
+++ lynx2-8-7/userdefs.h 2010-01-03 14:58:31.000000000 +0100
|
|
@@ -354,7 +354,7 @@
|
|
* the "TMPDIR" (unix), or "TEMP" or "TMP" (Windows,DOS,OS/2)
|
|
* variable.
|
|
*/
|
|
-#define TEMP_SPACE "/tmp/"
|
|
+#define TEMP_SPACE "~/tmp/"
|
|
|
|
/********************************
|
|
* Comment this line out to disable code that implements command logging
|