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.
This commit is contained in:
Carsten Elton Sørensen 2018-11-16 21:37:18 +01:00 committed by Arnim Läuger
parent 33613be550
commit bb9a5977d3
1 changed files with 1 additions and 1 deletions

View File

@ -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 {