From f0492ad02d4b75f2c26a191aaff5b3bd3ac8e81c Mon Sep 17 00:00:00 2001 From: d0k3 Date: Mon, 28 Nov 2016 23:38:18 +0100 Subject: [PATCH] Check for mount state when detecting image drives --- source/fs.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/source/fs.c b/source/fs.c index d163698..e7e52eb 100644 --- a/source/fs.c +++ b/source/fs.c @@ -129,7 +129,8 @@ int DriveType(const char* path) { type = DRV_FAT | DRV_SYSNAND | DRV_STDFAT; } else if ((pdrv >= 4) && (pdrv <= 6)) { type = DRV_FAT | DRV_EMUNAND | DRV_STDFAT; - } else if ((pdrv >= 7) && (pdrv <= 9)) { + } else if ((pdrv >= 7) && (pdrv <= 9) && + ((GetMountState() == IMG_FAT) || (GetMountState() == IMG_NAND))) { type = DRV_FAT | DRV_IMAGE | DRV_STDFAT; } } else if (CheckVirtualDrive(path)) {