From f8f5624a4df07c388567d112fba243dd88482eeb Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 24 May 2011 19:04:22 +0000 Subject: More picky URI to path conversion git-svn-id: http://svn.drobilla.net/serd/trunk@193 490d8e77-9747-427b-9fa3-0b8f29cee8a0 --- src/uri.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/uri.c b/src/uri.c index 921de4b7..04ca8c84 100644 --- a/src/uri.c +++ b/src/uri.c @@ -32,7 +32,10 @@ serd_uri_to_path(const uint8_t* uri) if (serd_uri_string_has_scheme(uri)) { // Absolute URI, ensure it a file and chop scheme if (strncmp((const char*)uri, "file:", 5)) { - fprintf(stderr, "Unsupported URI scheme `%s'\n", uri); + fprintf(stderr, "Non-file URI `%s'\n", uri); + return NULL; + } else if (strncmp((const char*)uri + 5, "//", 2)) { + fprintf(stderr, "Illegal file URI `%s'\n", uri); return NULL; #ifdef __WIN32__ } else if (!strncmp((const char*)uri, "file:///", 8)) { -- cgit v1.2.1