mirror of
https://github.com/switchbrew/libnx.git
synced 2025-06-21 12:32:40 +02:00
Fixed romfsUnmount RemoveDevice handling.
This commit is contained in:
parent
0d17c53d00
commit
006ebc0633
@ -418,13 +418,18 @@ static void romfsInitMtime(romfs_mount *mount)
|
|||||||
Result romfsUnmount(const char *name)
|
Result romfsUnmount(const char *name)
|
||||||
{
|
{
|
||||||
romfs_mount *mount;
|
romfs_mount *mount;
|
||||||
|
char tmpname[34];
|
||||||
|
|
||||||
mount = romfsFindMount(name);
|
mount = romfsFindMount(name);
|
||||||
if (mount == NULL)
|
if (mount == NULL)
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
// Remove device
|
// 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);
|
romfs_mountclose(mount);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user