From 59f7d6173eab25ec13ec1a7da45db615866ca6e9 Mon Sep 17 00:00:00 2001 From: d0k3 Date: Mon, 2 May 2016 11:40:12 +0200 Subject: [PATCH] Proper write protection handling for RAM drives --- source/fs.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/source/fs.c b/source/fs.c index 89f68c0..af535ed 100644 --- a/source/fs.c +++ b/source/fs.c @@ -86,6 +86,8 @@ bool CheckWritePermissions(const char* path) { (GetVirtualSource(path) == VRT_SYSNAND) ? 1 : (GetVirtualSource(path) == VRT_EMUNAND) ? 4 : 7; else return false; + } else if ((pdrv == 7) && (GetMountState() == IMG_RAMDRV)) { + pdrv = 0; // ...and another hack } if ((pdrv >= 1) && (pdrv <= 3) && (write_permission_level < 3)) {