diff --git a/file_io.cpp b/file_io.cpp index 8e712b1..81456aa 100644 --- a/file_io.cpp +++ b/file_io.cpp @@ -828,11 +828,6 @@ int findPrefixDir(char *dir, size_t dir_len) // /media/fat/games/ // if the core folder is not found anywhere, // it will be created in /media/fat/games/ - if (isPathDirectory(dir)) { - printf("Found existing: %s\n", dir); - return 1; - } - static char temp_dir[1024]; for (int x = 0; x < 6; x++) { @@ -865,6 +860,11 @@ int findPrefixDir(char *dir, size_t dir_len) return 1; } + if (isPathDirectory(dir)) { + printf("Found existing: %s\n", dir); + return 1; + } + snprintf(temp_dir, 1024, "%s/%s", GAMES_DIR, dir); if (isPathDirectory(temp_dir)) { printf("Found dir: %s\n", temp_dir);