/[packages]/updates/5/lynx/releases/2.8.8/1.pre1.1.mga4/SOURCES/lynx2-8-7-tmp_dir.patch
ViewVC logotype

Contents of /updates/5/lynx/releases/2.8.8/1.pre1.1.mga4/SOURCES/lynx2-8-7-tmp_dir.patch

Parent Directory Parent Directory | Revision Log Revision Log


Revision 823424 - (show annotations) (download)
Thu Jun 18 21:51:43 2015 UTC (8 years, 9 months ago) by umeabot
File size: 1228 byte(s)
SILENT Branching for Mageia 5
1 --- lynx2-8-7/src/LYMain.c.orig 2009-07-06 01:52:33.000000000 +0200
2 +++ lynx2-8-7/src/LYMain.c 2010-01-03 14:58:31.000000000 +0100
3 @@ -967,6 +967,7 @@
4 struct stat dir_info;
5 char filename[LY_MAXPATH];
6 BOOL LYGetStdinArgs = FALSE;
7 + struct stat st;
8
9 #ifdef _WINDOWS
10 WSADATA WSAData;
11 @@ -1209,6 +1210,21 @@
12 #endif
13 LYTildeExpand(&lynx_temp_space, TRUE);
14
15 +
16 + if (stat(lynx_temp_space, &st) < 0) {
17 + if (errno = ENOENT) {
18 + printf("Creating dir %s\n", lynx_temp_space);
19 + mkdir(lynx_temp_space, 0700);
20 + }
21 + }
22 +
23 + if (stat(lynx_temp_space, &st) < 0) {
24 + if (errno = ENOENT) {
25 + printf("Can't create %s, let's try /tmp/\n", lynx_temp_space);
26 + lynx_temp_space = "/tmp/";
27 + }
28 + }
29 +
30 if ((cp = strstr(lynx_temp_space, "$USER")) != NULL) {
31 char *cp1;
32
33 --- lynx2-8-7/userdefs.h.orig 2010-01-03 14:58:31.000000000 +0100
34 +++ lynx2-8-7/userdefs.h 2010-01-03 14:58:31.000000000 +0100
35 @@ -354,7 +354,7 @@
36 * the "TMPDIR" (unix), or "TEMP" or "TMP" (Windows,DOS,OS/2)
37 * variable.
38 */
39 -#define TEMP_SPACE "/tmp/"
40 +#define TEMP_SPACE "~/tmp/"
41
42 /********************************
43 * Comment this line out to disable code that implements command logging

  ViewVC Help
Powered by ViewVC 1.1.30