Try to create external/internal directory if it's not available.
Typically it always exists on new phones, but I didn't find any information if it's guaranteed to exist and it's missing on my old phone.
This commit is contained in:
parent
be5b389d94
commit
19736c2a51
@ -60,10 +60,18 @@ void AssetsAndroid::init()
|
||||
paths.push_back(getenv("SUPERTUXKART_DATADIR"));
|
||||
|
||||
if (global_android_app->activity->externalDataPath)
|
||||
{
|
||||
m_file_manager->checkAndCreateDirectoryP(
|
||||
global_android_app->activity->externalDataPath);
|
||||
paths.push_back(global_android_app->activity->externalDataPath);
|
||||
}
|
||||
|
||||
if (global_android_app->activity->internalDataPath)
|
||||
{
|
||||
m_file_manager->checkAndCreateDirectoryP(
|
||||
global_android_app->activity->internalDataPath);
|
||||
paths.push_back(global_android_app->activity->internalDataPath);
|
||||
}
|
||||
|
||||
if (getenv("EXTERNAL_STORAGE"))
|
||||
paths.push_back(getenv("EXTERNAL_STORAGE"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user