Commit | Line | Data |
---|---|---|
f3e251a4 LP |
1 | diff --git a/contrib/proxy/gen.c b/contrib/proxy/gen.c |
2 | index 6e7807ab..8b5b2b1a 100644 | |
3 | --- a/contrib/proxy/gen.c | |
4 | +++ b/contrib/proxy/gen.c | |
5 | @@ -5,7 +5,7 @@ | |
6 | #include <unistd.h> | |
7 | ||
8 | struct stat st; | |
9 | -char *file = "/tmp/log"; | |
10 | +char *file = "/data/data/com.termux/files/usr/tmp/log"; | |
11 | unsigned char *data; | |
12 | int counter = 0; | |
13 | ||
14 | @@ -17,7 +17,7 @@ struct { | |
15 | } tab[100000]; /* should be enough */ | |
16 | ||
17 | unsigned char header[] = | |
18 | -"#!/usr/bin/env python\n" | |
19 | +"#!/data/data/com.termux/files/usr/bin/env python\n" | |
20 | "import BaseHTTPServer\n\n"; | |
21 | ||
22 | unsigned char footer[] = | |
23 | diff --git a/src/network/socket.c b/src/network/socket.c | |
24 | index 3426b681..480d7378 100644 | |
25 | --- a/src/network/socket.c | |
26 | +++ b/src/network/socket.c | |
27 | @@ -83,7 +83,7 @@ static INIT_LIST_OF(struct socket_weak_ref, socket_weak_refs); | |
28 | /* To enable logging of tranfers, for debugging purposes. */ | |
29 | #if 0 | |
30 | ||
31 | -#define DEBUG_TRANSFER_LOGFILE "/tmp/log" | |
32 | +#define DEBUG_TRANSFER_LOGFILE "/data/data/com.termux/files/usr/tmp/log" | |
33 | ||
34 | static void | |
35 | debug_transfer_log(unsigned char *data, int len) | |
36 | diff --git a/src/osdep/unix/sysinfo.h b/src/osdep/unix/sysinfo.h | |
37 | index 7b4ef587..d2653d87 100644 | |
38 | --- a/src/osdep/unix/sysinfo.h | |
39 | +++ b/src/osdep/unix/sysinfo.h | |
40 | @@ -6,7 +6,7 @@ | |
41 | ||
42 | #define SYSTEM_NAME "Unix" | |
43 | #define SYSTEM_STR "unix" | |
44 | -#define DEFAULT_SHELL "/bin/sh" | |
45 | +#define DEFAULT_SHELL "/data/data/com.termux/files/usr/bin/sh" | |
46 | #define GETSHELL getenv("SHELL") | |
47 | ||
48 | static inline int dir_sep(char x) { return x == '/'; } | |
49 | diff --git a/src/protocol/file/mailcap.c b/src/protocol/file/mailcap.c | |
50 | index 24b47025..06eff352 100644 | |
51 | --- a/src/protocol/file/mailcap.c | |
52 | +++ b/src/protocol/file/mailcap.c | |
53 | @@ -110,7 +110,7 @@ mailcap_protocol_handler(struct connection *conn) | |
54 | /* We implicitly chain stderr to ELinks' stderr. */ | |
55 | close_all_non_term_fd(); | |
56 | ||
57 | - if (execl("/bin/sh", "/bin/sh", "-c", script, (char *) NULL)) { | |
58 | + if (execl("/data/data/com.termux/files/usr/bin/sh", "/data/data/com.termux/files/usr/bin/sh", "-c", script, (char *) NULL)) { | |
59 | _exit(3); | |
60 | } | |
61 | ||
62 | diff --git a/src/session/download.c b/src/session/download.c | |
63 | index 000bbe97..538f1715 100644 | |
64 | --- a/src/session/download.c | |
65 | +++ b/src/session/download.c | |
66 | @@ -373,7 +373,7 @@ exec_mailcap_command(void *data) | |
67 | add_to_string(&string, "mailcap:"); | |
68 | add_to_string(&string, exec_mailcap->command); | |
69 | if (exec_mailcap->file) { | |
70 | - add_to_string(&string, " && /bin/rm -f "); | |
71 | + add_to_string(&string, " && /data/data/com.termux/files/usr/bin/rm -f "); | |
72 | add_to_string(&string, exec_mailcap->file); | |
73 | } | |
74 | ||
75 | @@ -1067,7 +1067,7 @@ subst_file(unsigned char *prog, unsigned char *file) | |
76 | struct string s; | |
77 | ||
78 | if (init_string(&s)) { | |
79 | - add_to_string(&s, "/bin/cat "); | |
80 | + add_to_string(&s, "/data/data/com.termux/files/usr/bin/cat "); | |
81 | add_shell_quoted_to_string(&s, file, strlen(file)); | |
82 | add_to_string(&s, " | "); | |
83 | add_string_to_string(&s, &name); | |
84 | diff --git a/src/setup.h b/src/setup.h | |
85 | index 572610f5..5b69de99 100644 | |
86 | --- a/src/setup.h | |
87 | +++ b/src/setup.h | |
88 | @@ -83,11 +83,11 @@ | |
89 | ||
90 | /* Default mime settings */ | |
91 | #define DEFAULT_MIME_TYPE "application/octet-stream" | |
92 | -#define DEFAULT_PAGER_PATH "/usr/bin/pager" | |
93 | -#define DEFAULT_LESS_PATH "/usr/bin/less" | |
94 | -#define DEFAULT_MORE_PATH "/usr/bin/more" | |
95 | -#define DEFAULT_MAILCAP_PATH "~/.mailcap:/etc/mailcap:/usr/etc/mailcap:/usr/local/etc/mailcap:/usr/share/mailcap:/usr/share/misc/mailcap" | |
96 | -#define DEFAULT_MIMETYPES_PATH "~/.mime.types:/etc/mime.types:/usr/etc/mime.types:/usr/local/etc/mime.types:/usr/share/mime.types:/usr/share/misc/mime.types" | |
97 | +#define DEFAULT_PAGER_PATH "/data/data/com.termux/files/usr/bin/pager" | |
98 | +#define DEFAULT_LESS_PATH "/data/data/com.termux/files/usr/bin/less" | |
99 | +#define DEFAULT_MORE_PATH "/data/data/com.termux/files/usr/bin/more" | |
100 | +#define DEFAULT_MAILCAP_PATH "~/.mailcap:/data/data/com.termux/files/usr/etc/mailcap:/data/data/com.termux/files/usr/share/mailcap" | |
101 | +#define DEFAULT_MIMETYPES_PATH "~/.mime.types:/data/data/com.termux/files/usr/etc/mime.types:/data/data/com.termux/files/usr/share/mime.types" | |
102 | ||
103 | /* Default external commands (see osdep/newwin.c and/or system-specific osdep/ | |
104 | * files) */ | |
105 | diff --git a/src/util/file.c b/src/util/file.c | |
106 | index 90882eed..cae9052e 100644 | |
107 | --- a/src/util/file.c | |
108 | +++ b/src/util/file.c | |
109 | @@ -186,7 +186,7 @@ get_tempdir_filename(unsigned char *name) | |
110 | if (!tmpdir || !*tmpdir) tmpdir = getenv("TMP"); | |
111 | if (!tmpdir || !*tmpdir) tmpdir = getenv("TEMPDIR"); | |
112 | if (!tmpdir || !*tmpdir) tmpdir = getenv("TEMP"); | |
113 | - if (!tmpdir || !*tmpdir) tmpdir = "/tmp"; | |
114 | + if (!tmpdir || !*tmpdir) tmpdir = "/data/data/com.termux/files/usr/tmp"; | |
115 | ||
116 | return straconcat(tmpdir, "/", name, (unsigned char *) NULL); | |
117 | } |