diff options
author | David Robillard <d@drobilla.net> | 2011-05-24 19:04:22 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-05-24 19:04:22 +0000 |
commit | f8f5624a4df07c388567d112fba243dd88482eeb (patch) | |
tree | 3e139eb13bdb2b7668d1a2677c7821f761e2aa87 /src/uri.c | |
parent | c8e0e8cca88238b5506f1dfe09e9de081ff292dd (diff) | |
download | serd-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/uri.c')
-rw-r--r-- | src/uri.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -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)) { |