mirror of
https://github.com/d0k3/GodMode9.git
synced 2025-06-26 21:52:48 +00:00
Fix: Deleting files and creating dirs in alias drives
This commit is contained in:
parent
c031e6e03b
commit
a09711afe0
@ -41,7 +41,7 @@
|
|||||||
#define ENTRY_GATEWAY (2)
|
#define ENTRY_GATEWAY (2)
|
||||||
|
|
||||||
// GodMode9 version
|
// GodMode9 version
|
||||||
#define VERSION "1.0.0"
|
#define VERSION "1.0.1"
|
||||||
|
|
||||||
// input / output paths
|
// input / output paths
|
||||||
#define INPUT_PATHS "0:", "0:/files9", "1:/rw/files9"
|
#define INPUT_PATHS "0:", "0:/files9", "1:/rw/files9"
|
||||||
|
@ -751,7 +751,7 @@ bool PathDeleteWorker(char* fpath) {
|
|||||||
*(--fname) = '\0';
|
*(--fname) = '\0';
|
||||||
}
|
}
|
||||||
|
|
||||||
return (f_unlink(fpath) == FR_OK);
|
return (fa_unlink(fpath) == FR_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PathDelete(const char* path) {
|
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
|
char npath[256]; // 256 is the maximum length of a full path
|
||||||
if (!CheckWritePermissions(cpath)) return false;
|
if (!CheckWritePermissions(cpath)) return false;
|
||||||
snprintf(npath, 255, "%s/%s", cpath, dirname);
|
snprintf(npath, 255, "%s/%s", cpath, dirname);
|
||||||
return (f_mkdir(npath) == FR_OK);
|
return (fa_mkdir(npath) == FR_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CreateScreenshot() {
|
void CreateScreenshot() {
|
||||||
|
@ -132,12 +132,24 @@ FRESULT fa_opendir (DIR* dp, const TCHAR* path) {
|
|||||||
return f_opendir(dp, alias);
|
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) {
|
FRESULT fa_stat (const TCHAR* path, FILINFO* fno) {
|
||||||
TCHAR alias[256];
|
TCHAR alias[256];
|
||||||
dealias_path(alias, path);
|
dealias_path(alias, path);
|
||||||
return f_stat(alias, fno);
|
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
|
// special functions for access of virtual NAND SD drives
|
||||||
bool SetupNandSdDrive(const char* path, const char* sd_path, const char* movable, int num) {
|
bool SetupNandSdDrive(const char* path, const char* sd_path, const char* movable, int num) {
|
||||||
char alias[128];
|
char alias[128];
|
||||||
|
@ -13,7 +13,9 @@ FRESULT fx_close (FIL* fp);
|
|||||||
void dealias_path (TCHAR* alias, const TCHAR* path);
|
void dealias_path (TCHAR* alias, const TCHAR* path);
|
||||||
FRESULT fa_open (FIL* fp, const TCHAR* path, BYTE mode);
|
FRESULT fa_open (FIL* fp, const TCHAR* path, BYTE mode);
|
||||||
FRESULT fa_opendir (DIR* dp, const TCHAR* path);
|
FRESULT fa_opendir (DIR* dp, const TCHAR* path);
|
||||||
|
FRESULT fa_mkdir (const TCHAR* path);
|
||||||
FRESULT fa_stat (const TCHAR* path, FILINFO* fno);
|
FRESULT fa_stat (const TCHAR* path, FILINFO* fno);
|
||||||
|
FRESULT fa_unlink (const TCHAR* path);
|
||||||
|
|
||||||
// special functions for access of virtual NAND SD drives
|
// special functions for access of virtual NAND SD drives
|
||||||
bool SetupNandSdDrive(const char* path, const char* sd_path, const char* movable, int num);
|
bool SetupNandSdDrive(const char* path, const char* sd_path, const char* movable, int num);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user