[ox/fs] Fix GCC/Clang incompatibility

(synced from 517551348a)
This commit is contained in:
2019-12-31 19:54:57 -06:00
parent cec3e4ea01
commit 0bb4941558
+2 -1
View File
@@ -89,7 +89,8 @@ class PassThroughFS: public FileSystem {
template<typename F>
ox::Error PassThroughFS::ls(const char *dir, F cb) {
for (auto &p : std::filesystem::directory_iterator(m_path / stripSlash(dir))) {
oxReturnError(cb(p.path().filename().u8string(), 0));
auto u8p = p.path().filename().u8string();
oxReturnError(cb(u8p.c_str(), 0));
}
return OxError(0);
}