diff --git a/source/common/common.h b/source/common/common.h index 4c6d732..387a312 100644 --- a/source/common/common.h +++ b/source/common/common.h @@ -41,7 +41,7 @@ #define ENTRY_GATEWAY (2) // GodMode9 version -#define VERSION "1.0.0" +#define VERSION "1.0.1" // input / output paths #define INPUT_PATHS "0:", "0:/files9", "1:/rw/files9" diff --git a/source/fs/fsutil.c b/source/fs/fsutil.c index 56ed058..717405d 100644 --- a/source/fs/fsutil.c +++ b/source/fs/fsutil.c @@ -751,7 +751,7 @@ bool PathDeleteWorker(char* fpath) { *(--fname) = '\0'; } - return (f_unlink(fpath) == FR_OK); + return (fa_unlink(fpath) == FR_OK); } bool PathDelete(const char* path) { @@ -779,7 +779,7 @@ bool DirCreate(const char* cpath, const char* dirname) { char npath[256]; // 256 is the maximum length of a full path if (!CheckWritePermissions(cpath)) return false; snprintf(npath, 255, "%s/%s", cpath, dirname); - return (f_mkdir(npath) == FR_OK); + return (fa_mkdir(npath) == FR_OK); } void CreateScreenshot() { diff --git a/source/fs/sddata.c b/source/fs/sddata.c index 0b41bcd..f9dfd41 100644 --- a/source/fs/sddata.c +++ b/source/fs/sddata.c @@ -132,12 +132,24 @@ FRESULT fa_opendir (DIR* dp, const TCHAR* path) { return f_opendir(dp, alias); } +FRESULT fa_mkdir (const TCHAR* path) { + TCHAR alias[256]; + dealias_path(alias, path); + return f_mkdir(alias); +} + FRESULT fa_stat (const TCHAR* path, FILINFO* fno) { TCHAR alias[256]; dealias_path(alias, path); return f_stat(alias, fno); } +FRESULT fa_unlink (const TCHAR* path) { + TCHAR alias[256]; + dealias_path(alias, path); + return f_unlink(alias); +} + // special functions for access of virtual NAND SD drives bool SetupNandSdDrive(const char* path, const char* sd_path, const char* movable, int num) { char alias[128]; diff --git a/source/fs/sddata.h b/source/fs/sddata.h index 8d93227..cf9f6a5 100644 --- a/source/fs/sddata.h +++ b/source/fs/sddata.h @@ -13,7 +13,9 @@ FRESULT fx_close (FIL* fp); void dealias_path (TCHAR* alias, const TCHAR* path); FRESULT fa_open (FIL* fp, const TCHAR* path, BYTE mode); FRESULT fa_opendir (DIR* dp, const TCHAR* path); +FRESULT fa_mkdir (const TCHAR* path); FRESULT fa_stat (const TCHAR* path, FILINFO* fno); +FRESULT fa_unlink (const TCHAR* path); // special functions for access of virtual NAND SD drives bool SetupNandSdDrive(const char* path, const char* sd_path, const char* movable, int num);