diff options
author | neonloop | 2021-08-12 15:30:51 +0000 |
---|---|---|
committer | neonloop | 2021-08-12 15:30:51 +0000 |
commit | 1aff43f93d09b207d97cdf18ccf8d28aedc49158 (patch) | |
tree | 3805c847e4b2ca04727a3e15a3c9ae9af99c3191 | |
parent | 4f6bbfe3a4e16b3d322f9cd86a5f9ea1b8535d51 (diff) | |
download | picoarch-1aff43f93d09b207d97cdf18ccf8d28aedc49158.tar.gz picoarch-1aff43f93d09b207d97cdf18ccf8d28aedc49158.tar.bz2 picoarch-1aff43f93d09b207d97cdf18ccf8d28aedc49158.zip |
Places bios/etc in cwd/system rather than cwd
-rw-r--r-- | .gitignore | 3 | ||||
-rw-r--r-- | core.c | 6 |
2 files changed, 7 insertions, 2 deletions
@@ -1,8 +1,9 @@ *.o *.so +picoarch /pkg /profile -picoarch +/system /fbalpha2012 /gambatte @@ -212,6 +212,7 @@ error: static void set_directories(void) { const char *home = getenv("HOME"); + char cwd[MAX_PATH]; char *dst = save_dir; int len = MAX_PATH; @@ -225,7 +226,10 @@ static void set_directories(void) { #ifdef MINUI strncpy(system_dir, save_dir, MAX_PATH-1); #else - if (!getcwd(system_dir, MAX_PATH)) { + if (getcwd(cwd, MAX_PATH)) { + snprintf(system_dir, MAX_PATH, "%s/system", cwd); + mkdir(system_dir, 0755); + } else { PA_FATAL("Can't find system directory"); } #endif |