Skip to content
This repository was archived by the owner on Sep 9, 2025. It is now read-only.

Commit 5c798ec

Browse files
committed
feat: only manage JSON to avoid crash for weird files
1 parent 5f2b38f commit 5c798ec

1 file changed

Lines changed: 3 additions & 1 deletion

File tree

src/converter/src/io.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ pub fn determine_input_action(input_path: &Path) -> Result<InputAction> {
6565
.to_str()
6666
.ok_or_else(|| anyhow::anyhow!("Filename is not valid UTF-8"))?;
6767
if filename.ends_with(".ttl") || filename.ends_with(".jsonld") {
68-
return Ok(InputAction::Skip("Unknown extension.".to_string()));
68+
return Ok(InputAction::Skip("Already in RDF.".to_string()));
69+
} else if ! filename.ends_with(".json") {
70+
return Ok(InputAction::Skip("Unknown extension: the converter only handles JSON.".to_string()));
6971
}
7072

7173
let action = match detect_input_type(filename) {

0 commit comments

Comments
 (0)