This commit is contained in:
JeffRuLz 2019-07-13 13:55:58 -05:00 committed by GitHub
parent 0b313a9836
commit 185bcecfe1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 28 deletions

View File

@ -346,10 +346,7 @@ bool install(char* fpath, bool systemTitle)
iprintf("\n"); iprintf("\n");
if (!_checkSdSpace(installSize)) if (!_checkSdSpace(installSize))
goto error; goto error;
if (!_openMenuSlot())
goto error;
//system title patch //system title patch
if (systemTitle) if (systemTitle)
@ -387,6 +384,11 @@ bool install(char* fpath, bool systemTitle)
//create title directory /title/XXXXXXXX/XXXXXXXX //create title directory /title/XXXXXXXX/XXXXXXXX
char dirPath[32]; char dirPath[32];
mkdir("/title", 0777);
sprintf(dirPath, "/title/%08x", (unsigned int)h->tid_high);
mkdir(dirPath, 0777);
sprintf(dirPath, "/title/%08x/%08x", (unsigned int)h->tid_high, (unsigned int)h->tid_low); sprintf(dirPath, "/title/%08x/%08x", (unsigned int)h->tid_high, (unsigned int)h->tid_low);
//check if title is free //check if title is free
@ -404,7 +406,10 @@ bool install(char* fpath, bool systemTitle)
deleteDir(dirPath); deleteDir(dirPath);
iprintf("\n"); iprintf("\n");
} }
} }
if (!_openMenuSlot())
goto error;
mkdir(dirPath, 0777); mkdir(dirPath, 0777);
@ -437,28 +442,8 @@ bool install(char* fpath, bool systemTitle)
iprintf("\x1B[31m"); //red iprintf("\x1B[31m"); //red
iprintf("Failed\n"); iprintf("Failed\n");
iprintf("\x1B[33m"); //yellow iprintf("\x1B[33m"); //yellow
iprintf("%s\n", appPath);
iprintf("%s\n", strerror(errno)); iprintf("%s\n", strerror(errno));
/*
switch (result)
{
case 1:
iprintf("Empty input path.\n");
break;
case 2:
iprintf("Empty output path.\n");
break;
case 3:
iprintf("Error opening input file.\n");
break;
case 4:
iprintf("Error opening output file.\n");
break;
}
*/
iprintf("\x1B[47m"); //white iprintf("\x1B[47m"); //white
goto error; goto error;

View File

@ -3,7 +3,7 @@
#include "message.h" #include "message.h"
#include <time.h> #include <time.h>
#define VERSION "0.7.0" #define VERSION "0.7.1"
enum { enum {
MAIN_MENU_INSTALL, MAIN_MENU_INSTALL,
@ -82,7 +82,7 @@ int main(int argc, char **argv)
//DSi check //DSi check
if (!isDSiMode()) if (!isDSiMode())
{ {
messageBox("\x1B[31mError:\x1B[33m This app is only for DSi.\x1B[47m"); messageBox("\x1B[31mError:\x1B[33m This app is only for DSi.");
return 0; return 0;
} }