diff options
author | David Robillard <d@drobilla.net> | 2011-12-12 01:56:22 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-12-12 01:56:22 +0000 |
commit | 9098c7725ed74390b3b94d3b93c367e150821f4f (patch) | |
tree | 3eceba6bf66ba589616be5c66ba704cb4056ef07 /src/serdi.c | |
parent | f2373c4fd2b7688b0caca2061de41b6fe4946f7b (diff) | |
download | serd-9098c7725ed74390b3b94d3b93c367e150821f4f.tar.gz serd-9098c7725ed74390b3b94d3b93c367e150821f4f.tar.bz2 serd-9098c7725ed74390b3b94d3b93c367e150821f4f.zip |
Use common uri_to_path code.
git-svn-id: http://svn.drobilla.net/serd/trunk@249 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src/serdi.c')
-rw-r--r-- | src/serdi.c | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/src/serdi.c b/src/serdi.c index 93d40bf9..6020a271 100644 --- a/src/serdi.c +++ b/src/serdi.c @@ -155,22 +155,7 @@ main(int argc, char** argv) if (from_file) { in_name = in_name ? in_name : input; if (!in_fd) { - if (serd_uri_string_has_scheme(input)) { - // INPUT is an absolute URI, ensure it a file and chop scheme - if (strncmp((const char*)input, "file:", 5)) { - fprintf(stderr, "Unsupported URI scheme `%s'\n", input); - return 1; -#ifdef __WIN32__ - } else if (!strncmp((const char*)input, "file:///", 8)) { - input += 8; -#else - } else if (!strncmp((const char*)input, "file://", 7)) { - input += 7; -#endif - } else { - input += 5; - } - } + input = serd_uri_to_path(input); if (!(in_fd = serd_fopen((const char*)input, "r"))) { return 1; } |