Don't attempt to create folder if no drive mounted

This commit is contained in:
Pk11 2022-01-02 15:05:38 -06:00
parent ec9d7d8987
commit bfb136c866

View File

@ -203,7 +203,7 @@ int main(int argc, char **argv) {
// Ensure gm9i folder exists
char folderPath[10];
sprintf(folderPath, "%s:/gm9i", (sdMounted ? "sd" : "fat"));
if (access(folderPath, F_OK) != 0)
if ((sdMounted || flashcardMounted) && access(folderPath, F_OK) != 0)
mkdir(folderPath, 0777);
// Load config