We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents a801e96 + 8b8b70b commit ba84c1cCopy full SHA for ba84c1c
library/LuaApi.cpp
@@ -3207,7 +3207,12 @@ static int filesystem_listdir_recursive(lua_State *L)
3207
lua_pushinteger(L, i++);
3208
lua_newtable(L);
3209
lua_pushstring(L, "path");
3210
- lua_pushstring(L, (it->first).string().c_str());
+ auto p = (it->first).string();
3211
+ if constexpr (std::filesystem::path::preferred_separator != '/')
3212
+ {
3213
+ std::ranges::replace(p, std::filesystem::path::preferred_separator, '/');
3214
+ }
3215
+ lua_pushstring(L, p.c_str());
3216
lua_settable(L, -3);
3217
lua_pushstring(L, "isdir");
3218
lua_pushboolean(L, it->second);
0 commit comments