diff options
author | David Robillard <d@drobilla.net> | 2020-11-17 18:46:21 +0100 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2020-11-17 18:46:21 +0100 |
commit | 09aee4137b742819eb1ebfe4390d8809393e32ab (patch) | |
tree | 665df28295fa8c34a4e125b72035564aeae7de7f /src/sordi.c | |
parent | 7da3dbcfae5531e67a5c317676b739b38d527411 (diff) | |
download | sord-09aee4137b742819eb1ebfe4390d8809393e32ab.tar.gz sord-09aee4137b742819eb1ebfe4390d8809393e32ab.tar.bz2 sord-09aee4137b742819eb1ebfe4390d8809393e32ab.zip |
Remove use of deprecated serd_uri_to_path()
Diffstat (limited to 'src/sordi.c')
-rw-r--r-- | src/sordi.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/sordi.c b/src/sordi.c index 46e6273..49d761b 100644 --- a/src/sordi.c +++ b/src/sordi.c @@ -132,11 +132,15 @@ main(int argc, char** argv) return print_usage(argv[0], true); } - const uint8_t* input = (const uint8_t*)argv[a++]; + uint8_t* input_path = NULL; + const uint8_t* input = (const uint8_t*)argv[a++]; if (from_file) { in_name = in_name ? in_name : input; if (!in_fd) { - input = serd_uri_to_path(in_name); + if (!strncmp((const char*)input, "file:", 5)) { + input_path = serd_file_uri_parse(input, NULL); + input = input_path; + } if (!input || !(in_fd = fopen((const char*)input, "rb"))) { return 1; } @@ -192,6 +196,7 @@ main(int argc, char** argv) serd_env_free(env); serd_env_free(write_env); serd_node_free(&base); + free(input_path); sord_free(sord); sord_world_free(world); |