aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-05-24 19:04:22 +0000
committerDavid Robillard <d@drobilla.net>2011-05-24 19:04:22 +0000
commitf8f5624a4df07c388567d112fba243dd88482eeb (patch)
tree3e139eb13bdb2b7668d1a2677c7821f761e2aa87 /src
parentc8e0e8cca88238b5506f1dfe09e9de081ff292dd (diff)
downloadserd-f8f5624a4df07c388567d112fba243dd88482eeb.tar.gz
serd-f8f5624a4df07c388567d112fba243dd88482eeb.tar.bz2
serd-f8f5624a4df07c388567d112fba243dd88482eeb.zip
More picky URI to path conversion
git-svn-id: http://svn.drobilla.net/serd/trunk@193 490d8e77-9747-427b-9fa3-0b8f29cee8a0
Diffstat (limited to 'src')
-rw-r--r--src/uri.c5
1 files changed, 4 insertions, 1 deletions
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)) {