mirror of
https://github.com/lunarmodules/luafilesystem.git
synced 2026-07-22 02:53:06 +00:00
50919ed69ff64df51d8d586d00834fde3e901785
When the second argument is not a string, _file_info() wants to ensure that there is a table on top of the stack: the second argument or a new table. If a new table is pushed it's created on top immediately, but if a table is passed as the second argument it can be followed by extra arguments, with the last one ending up being used as a table, causing a crash. The fix is to remove any potential extra arguments using `lua_settop(L, 2)`. Also added a few tests for this case. Ref #80.
LuaFileSystem - File System Library for Lua
Copyright 2003-2016 Kepler Project
http://keplerproject.github.io/luafilesystem
Description
LuaFileSystem is a Lua library developed to complement the set of functions related to file systems offered by the standard Lua distribution.
LuaFileSystem offers a portable way to access the underlying directory structure and file attributes. LuaFileSystem is free software and uses the same license as Lua 5.1
LuaRocks Installation
luarocks install luafilesystem
Documentation
Please check the documentation at doc/us/ for more information.
Languages
C
77.2%
Lua
21.5%
Makefile
1.3%
