diff options
Diffstat (limited to 'crates/shirabe/src/config/json_config_source.rs')
| -rw-r--r-- | crates/shirabe/src/config/json_config_source.rs | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/crates/shirabe/src/config/json_config_source.rs b/crates/shirabe/src/config/json_config_source.rs index 59146630..5e927398 100644 --- a/crates/shirabe/src/config/json_config_source.rs +++ b/crates/shirabe/src/config/json_config_source.rs @@ -48,7 +48,11 @@ impl JsonConfigSource { .into()); } - contents = file_get_contents(self.file.borrow().get_path()).unwrap_or_default(); + // TODO(bytes): JsonManipulator takes the JSON as a String. + contents = String::from_utf8_lossy( + &file_get_contents(self.file.borrow().get_path()).unwrap_or_default(), + ) + .into_owned(); } else if self.auth_config { contents = "{\n}\n".to_string(); } else { |
