From bb9a5977d3eddd65b653b76dc4769cfd35be630e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carsten=20Elton=20S=C3=B8rensen?= Date: Fri, 16 Nov 2018 21:37:18 +0100 Subject: [PATCH] Calling vol:umount() would fail (#2558) The volume returned by file.mount() could not be unmounted, because vol:umount() would fail with a cryptic error about the uncallable nature of the volume userdata object. This was due to the wrong metatable name being used for setting up the volume structure. The correct name, as registered elsewhere in file.c, is now used, and vol:umount() is callable. --- app/modules/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/modules/file.c b/app/modules/file.c index 8ccb4924..2616202f 100644 --- a/app/modules/file.c +++ b/app/modules/file.c @@ -587,7 +587,7 @@ static int file_mount( lua_State *L ) if (vol->vol = vfs_mount( ldrv, num )) { /* set its metatable */ - luaL_getmetatable(L, "vfs.vol"); + luaL_getmetatable(L, "file.vol"); lua_setmetatable(L, -2); return 1; } else {