Show file errors before asking to install

This commit is contained in:
Pk11 2022-01-14 10:35:42 -06:00
parent 463e6a6394
commit 4f1657ab2c
2 changed files with 13 additions and 14 deletions

View File

@ -361,19 +361,6 @@ bool install(char* fpath, bool systemTitle)
return false;
}
//confirmation message
{
char str[] = "Are you sure you want to install\n";
char* msg = (char*)malloc(strlen(str) + strlen(fpath) + 8);
sprintf(msg, "%s%s\n", str, fpath);
bool choice = choiceBox(msg);
free(msg);
if (choice == NO)
return false;
}
//start installation
clearScreen(&bottomScreen);
@ -422,6 +409,19 @@ bool install(char* fpath, bool systemTitle)
goto error;
}
//confirmation message
{
char str[] = "Are you sure you want to install\n";
char* msg = (char*)malloc(strlen(str) + strlen(fpath) + 8);
sprintf(msg, "%s%s\n", str, fpath);
bool choice = choiceBox(msg);
free(msg);
if (choice == NO)
return false;
}
if (!sdnandMode && !nandio_unlock_writing())
return false;

View File

@ -355,7 +355,6 @@ static bool delete(Menu* m)
{
char dirPath[64];
sprintf(dirPath, "%.*s", sdnandMode ? 27 : 29, fpath);
nocashMessage(dirPath);
if (!dirExists(dirPath))
{