aboutsummaryrefslogtreecommitdiffstats
path: root/tools/serd-pipe.c
diff options
context:
space:
mode:
Diffstat (limited to 'tools/serd-pipe.c')
-rw-r--r--tools/serd-pipe.c13
1 files changed, 2 insertions, 11 deletions
diff --git a/tools/serd-pipe.c b/tools/serd-pipe.c
index 894a422b..1ad07719 100644
--- a/tools/serd-pipe.c
+++ b/tools/serd-pipe.c
@@ -340,19 +340,10 @@ main(int argc, char** argv)
for (int i = 0; !st && i < n_inputs; ++i) {
if (!base && !!strcmp(inputs[i], "-")) {
- char* const input_path = zix_canonical_path(NULL, inputs[i]);
- if (!input_path) {
- SERDI_ERRORF("failed to resolve path %s\n", inputs[i]);
- st = SERD_BAD_ARG;
+ if ((st = serd_set_base_uri_from_path(env, inputs[i]))) {
+ SERDI_ERRORF("failed to set base URI from path %s\n", inputs[i]);
break;
}
-
- SerdNode* const file_uri =
- serd_new_file_uri(serd_string(input_path), serd_empty_string());
-
- serd_env_set_base_uri(env, serd_node_string_view(file_uri));
- serd_node_free(file_uri);
- zix_free(NULL, input_path);
}
if (n_inputs > 1) {