mirror of
https://github.com/PurpleI2P/i2pd.git
synced 2025-04-24 01:46:36 +02:00
get home directory from EXTERNAL_STORAGE for andorid
This commit is contained in:
parent
bef628212e
commit
a41f179785
1 changed files with 16 additions and 14 deletions
6
FS.cpp
6
FS.cpp
|
@ -66,9 +66,11 @@ namespace fs {
|
||||||
return;
|
return;
|
||||||
#else /* other unix */
|
#else /* other unix */
|
||||||
#if defined(ANDROID)
|
#if defined(ANDROID)
|
||||||
if (boost::filesystem::exists("/sdcard"))
|
const char * ext = getenv("EXTERNAL_STORAGE");
|
||||||
|
if (!ext) ext = "/sdcard";
|
||||||
|
if (boost::filesystem::exists(ext))
|
||||||
{
|
{
|
||||||
dataDir = "/sdcard/" + appName;
|
dataDir = ext + appName;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// otherwise use /data/files
|
// otherwise use /data/files
|
||||||
|
|
Loading…
Add table
Reference in a new issue