Updated lbs to use new uniproc library
Fixed bug in fs.list_alldirs where it used directory_iterator rather that recursive_directory_iterator Fixed memory/type bugs in lua_platform.cpp Updated lbs.lua to reflect this
This commit is contained in:
@@ -94,11 +94,12 @@ int lua_fs_list_alldirs(lua_State* L)
|
||||
const char* fpath = lua_tostring(L, 1);
|
||||
lua_newtable(L);
|
||||
uint32_t i = 1;
|
||||
for (const std::filesystem::path& p : std::filesystem::directory_iterator(fpath))
|
||||
for (const std::filesystem::path& p : std::filesystem::recursive_directory_iterator(fpath))
|
||||
{
|
||||
const std::string x = p.string();
|
||||
lua_pushlstring(L, x.c_str(), x.size());
|
||||
lua_rawseti(L, -2, i);
|
||||
i++;
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user