mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 05:03:43 +01:00
Merge branch 'ahf/android-gp-fixes-bulk' into 'main'
Bulk Android path changes Closes #40487 See merge request tpo/core/tor!762
This commit is contained in:
commit
7278c1554d
3
changes/ticket40487
Normal file
3
changes/ticket40487
Normal file
@ -0,0 +1,3 @@
|
||||
o Minor features (portability, android):
|
||||
- Use /data/local/tmp for data storage on Android by default. Closes ticket
|
||||
40487. Patch from Hans-Christoph Steiner.
|
@ -483,6 +483,13 @@ static const config_var_t option_vars_[] = {
|
||||
#ifdef _WIN32
|
||||
V(GeoIPFile, FILENAME, "<default>"),
|
||||
V(GeoIPv6File, FILENAME, "<default>"),
|
||||
#elif defined(__ANDROID__)
|
||||
/* Android apps use paths that are configured at runtime.
|
||||
* /data/local/tmp is guaranteed to exist, but will only be
|
||||
* usable by the 'shell' and 'root' users, so this fallback is
|
||||
* for debugging only. */
|
||||
V(GeoIPFile, FILENAME, "/data/local/tmp/geoip"),
|
||||
V(GeoIPv6File, FILENAME, "/data/local/tmp/geoip6"),
|
||||
#else
|
||||
V(GeoIPFile, FILENAME,
|
||||
SHARE_DATADIR PATH_SEPARATOR "tor" PATH_SEPARATOR "geoip"),
|
||||
@ -6900,6 +6907,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