From e5ffa885b65ec89089fb02e3609c44a9023175cd Mon Sep 17 00:00:00 2001 From: aspargas2 Date: Sat, 8 Aug 2020 01:00:01 -0400 Subject: [PATCH] fix directly remounting the file which is already mounted --- arm9/source/filesys/image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arm9/source/filesys/image.c b/arm9/source/filesys/image.c index 507f9f5..a7237dc 100644 --- a/arm9/source/filesys/image.c +++ b/arm9/source/filesys/image.c @@ -60,7 +60,6 @@ const char* GetMountPath(void) { } u64 MountImage(const char* path) { - u64 type = (path) ? IdentifyFileType(path) : 0; if (mount_state) { fvx_close(&mount_file); if (fix_cmac) FixFileCmac(mount_path, false); @@ -68,6 +67,7 @@ u64 MountImage(const char* path) { mount_state = 0; *mount_path = 0; } + u64 type = (path) ? IdentifyFileType(path) : 0; if (!type) return 0; if ((fvx_open(&mount_file, path, FA_READ | FA_WRITE | FA_OPEN_EXISTING) != FR_OK) && (fvx_open(&mount_file, path, FA_READ | FA_OPEN_EXISTING) != FR_OK))