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:
2025-03-06 19:27:19 +11:00
parent 40ea3caf2a
commit 68e2c49c8f
6 changed files with 80 additions and 47 deletions

View File

@@ -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;
}