mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:37:43 +00:00
LibKeyboard: Use correct filename in debug message
This commit is contained in:
parent
484ec94624
commit
0e4dc5f7a1
1 changed files with 4 additions and 2 deletions
|
@ -25,14 +25,16 @@ Optional<CharacterMapData> CharacterMapFile::load_from_file(const String& filena
|
||||||
auto file = Core::File::construct(path);
|
auto file = Core::File::construct(path);
|
||||||
file->open(Core::OpenMode::ReadOnly);
|
file->open(Core::OpenMode::ReadOnly);
|
||||||
if (!file->is_open()) {
|
if (!file->is_open()) {
|
||||||
dbgln("Failed to open {}: {}", filename, file->error_string());
|
dbgln("Failed to open {}: {}", path, file->error_string());
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
auto file_contents = file->read_all();
|
auto file_contents = file->read_all();
|
||||||
auto json_result = JsonValue::from_string(file_contents);
|
auto json_result = JsonValue::from_string(file_contents);
|
||||||
if (!json_result.has_value())
|
if (!json_result.has_value()) {
|
||||||
|
dbgln("Failed to load character map from file {}", path);
|
||||||
return {};
|
return {};
|
||||||
|
}
|
||||||
auto json = json_result.value().as_object();
|
auto json = json_result.value().as_object();
|
||||||
|
|
||||||
Vector<u32> map = read_map(json, "map");
|
Vector<u32> map = read_map(json, "map");
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue