aboutsummaryrefslogtreecommitdiffstats
path: root/src/serdi.c
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2018-02-04 20:49:28 +0100
committerDavid Robillard <d@drobilla.net>2018-12-30 17:56:22 -0500
commit9f7d2de1ee0443c1d82a854ac459fc7dbe79749d (patch)
tree703e6a437d7fc6066e0db83df9c454455e9e88fe /src/serdi.c
parent873b05eaedf2c3978cd98268afa6f982a25bc80b (diff)
downloadserd-9f7d2de1ee0443c1d82a854ac459fc7dbe79749d.tar.gz
serd-9f7d2de1ee0443c1d82a854ac459fc7dbe79749d.tar.bz2
serd-9f7d2de1ee0443c1d82a854ac459fc7dbe79749d.zip
Remove serd_uri_to_path()
Diffstat (limited to 'src/serdi.c')
-rw-r--r--src/serdi.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/serdi.c b/src/serdi.c
index 02714201..5cea387e 100644
--- a/src/serdi.c
+++ b/src/serdi.c
@@ -201,11 +201,15 @@ main(int argc, char** argv)
return 1;
}
- const char* input = (const char*)argv[a++];
+ char* input_path = NULL;
+ const char* input = (const char*)argv[a++];
if (from_file) {
in_name = in_name ? in_name : input;
if (!in_fd) {
- input = serd_uri_to_path(in_name);
+ if (!strncmp(input, "file:", 5)) {
+ input_path = serd_file_uri_parse(input, NULL);
+ input = input_path;
+ }
if (!input || !(in_fd = serd_fopen(input, "rb"))) {
return 1;
}
@@ -296,6 +300,7 @@ main(int argc, char** argv)
serd_writer_free(writer);
serd_env_free(env);
serd_node_free(base);
+ free(input_path);
if (from_file) {
fclose(in_fd);