Closed thekiefs closed 2 years ago
That is performed before loading the config and there isn't much that can be done. The file placement situation is already difficult enough as is to be adding any more weird rules.
On windows we have this:
void dir_check_defaults(void)
{
unsigned i;
/* early return for people with a custom folder setup
so it doesn't create unnecessary directories
*/
#if defined(ORBIS) || defined(ANDROID)
if (path_is_valid("host0:app/custom.ini"))
#else
if (path_is_valid("custom.ini"))
#endif
return;
for (i = 0; i < DEFAULT_DIR_LAST; i++)
{
char *new_path = NULL;
const char *dir_path = g_defaults.dirs[i];
if (string_is_empty(dir_path))
continue;
new_path = (char*)malloc(PATH_MAX_LENGTH * sizeof(char));
if (!new_path)
continue;
new_path[0] = '\0';
fill_pathname_expand_special(new_path,
dir_path,
PATH_MAX_LENGTH * sizeof(char));
if (!path_is_directory(new_path))
path_mkdir(new_path);
free(new_path);
}
}
Basically checks if there is a custom.ini in the retroarch dir. If such a file exists it doesn't re-create the internal dirs.
I see there is an android implementation but it's wrong. Also were would custom.ini reside? Actually for my own personal builds I have RetroArch set to store the global config in the RetroArch dir instead of /sdcard/Android/data/com.retroarch/files.
Anyway imho this should be a wont't fix. plenty of applicatioons create folders in sdcard.
Ok, but if there is an android implementation why not fix it so it is used correctly?
And I don't know of many applications that create folders in sdcard when the user has purposefully pointed the application to write to another directory / external card.
The same problem happens on Mac still in 2023. I defined a custom directory for Retroarch-related saves and updated the corresponding configuration file, but the application keeps creating empty folders in my own personal documents folder.
I don't understand why somebody mentioned this should be a won't fix since it looks this was a previous lazy fix to avoid other problems. But honestly, there should be a way to prevent this from happening. It's also confusing having two RetroArch state folders, the one that I'm currently using, and the other one that gets created automatically.
Description
RetroArch keeps creating the /storage/emulated/0/RetroArch/ and associated subfolders (like cheats, screenshots, configs, etc) despite changing the default directory structure to a different location, even after I delete said folder
Expected behavior
I expect RetroArch to use the custom folders I set
Actual behavior
RetroArch re-creates the default folders
Steps to reproduce the bug
Bisect Results
[Try to bisect and tell us when this started happening]
Version/Commit
You can find this information under Information/System Information
Environment information