mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-12-11 21:23:35 +01:00
On Android, get_data_directory() should not use LOCALSTATEDIR
closes https://gitlab.torproject.org/tpo/core/tor/-/issues/40487
This commit is contained in:
parent
9d8b0c5bdc
commit
ccdae2f753
@ -6883,6 +6883,15 @@ get_data_directory(const char *val)
|
||||
} else {
|
||||
return tor_strdup(get_windows_conf_root());
|
||||
}
|
||||
#elif defined(__ANDROID__)
|
||||
/* Android apps can only use paths that are configured at runtime.
|
||||
* /data/local/tmp is guaranteed to exist, but is only usable by the
|
||||
* 'shell' and 'root' users, so this fallback is for debugging only. */
|
||||
if (val) {
|
||||
return tor_strdup(val);
|
||||
} else {
|
||||
return tor_strdup("/data/local/tmp");
|
||||
}
|
||||
#else /* !defined(_WIN32) */
|
||||
const char *d = val;
|
||||
if (!d)
|
||||
|
Loading…
Reference in New Issue
Block a user