From 9098c7725ed74390b3b94d3b93c367e150821f4f Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 12 Dec 2011 01:56:22 +0000 Subject: Use common uri_to_path code. git-svn-id: http://svn.drobilla.net/serd/trunk@249 490d8e77-9747-427b-9fa3-0b8f29cee8a0 --- src/serdi.c | 17 +---------------- 1 file changed, 1 insertion(+), 16 deletions(-) (limited to 'src/serdi.c') 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; } -- cgit v1.2.1