[ox] Get building in MSVC
This commit is contained in:
@@ -28,7 +28,8 @@ std::string PassThroughFS::basePath() {
|
||||
Error PassThroughFS::mkdir(const char *path, bool recursive) {
|
||||
bool success = false;
|
||||
const auto p = m_path / stripSlash(path);
|
||||
oxTrace("ox::fs::PassThroughFS::mkdir") << p.c_str();
|
||||
const auto u8p = p.u8string();
|
||||
oxTrace("ox::fs::PassThroughFS::mkdir") << u8p.c_str();
|
||||
if (recursive) {
|
||||
success = std::filesystem::create_directories(p);
|
||||
} else {
|
||||
|
@@ -89,9 +89,7 @@ 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))) {
|
||||
if (auto err = cb(p.path().filename().c_str(), 0); err) {
|
||||
return err;
|
||||
}
|
||||
oxReturnError(cb(p.path().filename().u8string(), 0));
|
||||
}
|
||||
return OxError(0);
|
||||
}
|
||||
|
Reference in New Issue
Block a user