mirror of
https://github.com/MadeOfJelly/MushMachine.git
synced 2025-07-04 00:26:46 +02:00
minor filesystem fixups
This commit is contained in:
@ -296,11 +296,13 @@ nlohmann::json FilesystemService::readJson(fs_file_t file) const {
|
||||
std::string buffer;
|
||||
readString(file, buffer);
|
||||
|
||||
return nlohmann::json::parse(buffer);
|
||||
// disable exeptions
|
||||
// TODO: use callback instead of readString()
|
||||
return nlohmann::json::parse(buffer, nullptr, false);
|
||||
}
|
||||
|
||||
nlohmann::json FilesystemService::readJson(const char* filepath) const {
|
||||
if (!exists(filepath)) {
|
||||
if (!isFile(filepath)) {
|
||||
return {};
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user