Commit bb9a5977 authored by Carsten Elton Sørensen's avatar Carsten Elton Sørensen Committed by Arnim Läuger
Browse files

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.
parent 33613be5
......@@ -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 {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment