From 006ebc0633a8a418c758be8043ecc426b28d81a9 Mon Sep 17 00:00:00 2001 From: yellows8 Date: Thu, 13 Jun 2019 19:41:35 -0400 Subject: [PATCH] Fixed romfsUnmount RemoveDevice handling. --- nx/source/runtime/devices/romfs_dev.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nx/source/runtime/devices/romfs_dev.c b/nx/source/runtime/devices/romfs_dev.c index b1779618..85940792 100644 --- a/nx/source/runtime/devices/romfs_dev.c +++ b/nx/source/runtime/devices/romfs_dev.c @@ -418,13 +418,18 @@ static void romfsInitMtime(romfs_mount *mount) Result romfsUnmount(const char *name) { romfs_mount *mount; + char tmpname[34]; mount = romfsFindMount(name); if (mount == NULL) return -1; // Remove device - RemoveDevice(name); + memset(tmpname, 0, sizeof(tmpname)); + strncpy(tmpname, mount->name, sizeof(tmpname)-2); + strncat(tmpname, ":", sizeof(tmpname)-strlen(tmpname)-1); + + RemoveDevice(tmpname); romfs_mountclose(mount);