Magic tools: Android forbids restricted users from some standard dirs, detecting custom ones at runtime.
This commit is contained in:
parent
2a159dd049
commit
eafa02812e
1 changed files with 9 additions and 1 deletions
|
|
@ -18942,7 +18942,15 @@ static void load_magic_plugins(void)
|
||||||
for (plc = 0; plc < NUM_MAGIC_PLACES; plc++)
|
for (plc = 0; plc < NUM_MAGIC_PLACES; plc++)
|
||||||
{
|
{
|
||||||
if (plc == MAGIC_PLACE_GLOBAL)
|
if (plc == MAGIC_PLACE_GLOBAL)
|
||||||
place = strdup(MAGIC_PREFIX);
|
{
|
||||||
|
#if defined (__ANDROID__)
|
||||||
|
/* Need this at runtime as Android installs on different locations depending on the user */
|
||||||
|
place = strdup(SDL_AndroidGetInternalStoragePath());
|
||||||
|
strcpy(strstr(place, "/files"), "/lib/");
|
||||||
|
#else
|
||||||
|
place = strdup(MAGIC_PREFIX);
|
||||||
|
#endif
|
||||||
|
}
|
||||||
else if (plc == MAGIC_PLACE_LOCAL)
|
else if (plc == MAGIC_PLACE_LOCAL)
|
||||||
place = get_fname("plugins/", DIR_DATA);
|
place = get_fname("plugins/", DIR_DATA);
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue