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

Commit 0462b60

Browse files
authored
Merge pull request #55 from sdsc-ordes/fix/uri-generation
feat: only manage JSON to avoid crash for weird files
2 parents 5f2b38f + c0fe520 commit 0462b60

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

src/converter/src/io.rs

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,11 @@ 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(
71+
"Unknown extension: the converter only handles JSON.".to_string(),
72+
));
6973
}
7074

7175
let action = match detect_input_type(filename) {

0 commit comments

Comments
 (0)