Browse Source

get home directory from EXTERNAL_STORAGE for andorid

pull/695/head
orignal 8 years ago
parent
commit
a41f179785
  1. 6
      FS.cpp

6
FS.cpp

@ -66,9 +66,11 @@ namespace fs { @@ -66,9 +66,11 @@ namespace fs {
return;
#else /* other unix */
#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;
}
// otherwise use /data/files

Loading…
Cancel
Save