diff options
author | Alexander Færøy <ahf@torproject.org> | 2023-09-13 18:29:54 +0200 |
---|---|---|
committer | Alexander Færøy <ahf@torproject.org> | 2023-09-13 18:29:54 +0200 |
commit | 22f024693204352247025f27d498db3e76f52964 (patch) | |
tree | 7df9c609a73d686dd3f20f5edea23b14050f77f3 /src/app/config | |
parent | 1cf796d3b4246b787c30b436a901a52cf86e04bf (diff) | |
parent | ccdae2f753ea7125962f65fc50478753e40cc76b (diff) | |
download | tor-22f024693204352247025f27d498db3e76f52964.tar.gz tor-22f024693204352247025f27d498db3e76f52964.zip |
Merge remote-tracking branch 'upstream/merge-requests/493' into ahf/android-gp-fixes-bulk
Diffstat (limited to 'src/app/config')
-rw-r--r-- | src/app/config/config.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/app/config/config.c b/src/app/config/config.c index a9585d98f2..102d1bbc04 100644 --- a/src/app/config/config.c +++ b/src/app/config/config.c @@ -6907,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) |