From 185bcecfe11843eedbfb4dec73aada98ea781d4d Mon Sep 17 00:00:00 2001 From: JeffRuLz Date: Sat, 13 Jul 2019 13:55:58 -0500 Subject: [PATCH] 0.7.1 --- arm9/src/install.c | 37 +++++++++++-------------------------- arm9/src/main.c | 4 ++-- 2 files changed, 13 insertions(+), 28 deletions(-) diff --git a/arm9/src/install.c b/arm9/src/install.c index c4085dc..3577873 100644 --- a/arm9/src/install.c +++ b/arm9/src/install.c @@ -346,10 +346,7 @@ bool install(char* fpath, bool systemTitle) iprintf("\n"); if (!_checkSdSpace(installSize)) - goto error; - - if (!_openMenuSlot()) - goto error; + goto error; //system title patch if (systemTitle) @@ -387,6 +384,11 @@ bool install(char* fpath, bool systemTitle) //create title directory /title/XXXXXXXX/XXXXXXXX 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); //check if title is free @@ -404,7 +406,10 @@ bool install(char* fpath, bool systemTitle) deleteDir(dirPath); iprintf("\n"); } - } + } + + if (!_openMenuSlot()) + goto error; mkdir(dirPath, 0777); @@ -437,28 +442,8 @@ bool install(char* fpath, bool systemTitle) iprintf("\x1B[31m"); //red iprintf("Failed\n"); iprintf("\x1B[33m"); //yellow - + iprintf("%s\n", appPath); 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 goto error; diff --git a/arm9/src/main.c b/arm9/src/main.c index b521b31..35f3295 100644 --- a/arm9/src/main.c +++ b/arm9/src/main.c @@ -3,7 +3,7 @@ #include "message.h" #include -#define VERSION "0.7.0" +#define VERSION "0.7.1" enum { MAIN_MENU_INSTALL, @@ -82,7 +82,7 @@ int main(int argc, char **argv) //DSi check 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; }