diff --git a/source/fs.c b/source/fs.c index 9dd3542..94885d6 100644 --- a/source/fs.c +++ b/source/fs.c @@ -208,13 +208,7 @@ bool CheckWritePermissions(const char* path) { int drvtype = DriveType(path); u32 perm; - if (drvtype & DRV_SDCARD) { - perm = PERM_SDCARD; - snprintf(area_name, 16, "the SD card"); - } else if (drvtype & DRV_RAMDRIVE) { - perm = PERM_RAMDRIVE; - snprintf(area_name, 16, "the RAM drive"); - } else if (drvtype & DRV_SYSNAND) { + if (drvtype & DRV_SYSNAND) { perm = PERM_SYSNAND; snprintf(area_name, 16, "the SysNAND"); // check virtual file flags (if any) @@ -232,6 +226,15 @@ bool CheckWritePermissions(const char* path) { } else if (drvtype & DRV_MEMORY) { perm = PERM_MEMORY; snprintf(area_name, 16, "memory areas"); + } else if ((drvtype & DRV_ALIAS) || (strncmp(path, "0:/Nintendo 3DS", 15) == 0)) { + perm = PERM_SDDATA; + snprintf(area_name, 16, "SD system data"); + } else if (drvtype & DRV_SDCARD) { + perm = PERM_SDCARD; + snprintf(area_name, 16, "the SD card"); + } else if (drvtype & DRV_RAMDRIVE) { + perm = PERM_RAMDRIVE; + snprintf(area_name, 16, "the RAM drive"); } else { return false; } @@ -273,6 +276,10 @@ bool SetWritePermissions(u32 perm, bool add_perm) { if (!ShowUnlockSequence(2, "You want to enable image\nwriting permissions.")) return false; break; + case PERM_SDDATA: + if (!ShowUnlockSequence(2, "You want to enable SD data\nwriting permissions.")) + return false; + break; #ifndef SAFEMODE case PERM_SYSNAND: if (!ShowUnlockSequence(3, "!Better be careful!\n \nYou want to enable SysNAND\nwriting permissions.\nThis enables you to do some\nreally dangerous stuff!")) diff --git a/source/fs.h b/source/fs.h index a15063d..52ff444 100644 --- a/source/fs.h +++ b/source/fs.h @@ -34,8 +34,9 @@ typedef enum { #define PERM_IMAGE (1<<4) #define PERM_MEMORY (1<<5) #define PERM_A9LH ((1<<6) | PERM_SYSNAND) +#define PERM_SDDATA ((1<<7) | PERM_SDCARD) #define PERM_BASE (PERM_SDCARD | PERM_RAMDRIVE) -#define PERM_ALL (PERM_SDCARD | PERM_RAMDRIVE | PERM_EMUNAND | PERM_SYSNAND | PERM_IMAGE | PERM_MEMORY) +#define PERM_ALL (PERM_SDCARD | PERM_RAMDRIVE | PERM_EMUNAND | PERM_SYSNAND | PERM_IMAGE | PERM_MEMORY | PERM_SDDATA) // move / copy flags #define ASK_ALL (1<<0) diff --git a/source/godmode.c b/source/godmode.c index 0b2a062..685251a 100644 --- a/source/godmode.c +++ b/source/godmode.c @@ -7,7 +7,7 @@ #include "virtual.h" #include "image.h" -#define VERSION "0.7.0" +#define VERSION "0.7.1" #define N_PANES 2 #define IMG_DRV "789I"