diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-11-06 22:41:22 +0100 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-11-06 22:41:22 +0100 |
commit | 4d1f330c0b4d15c834befa17d33558fb773d0259 (patch) | |
tree | e54fb59bba3faf2a58d5ce7e798e3cf2e3c823f2 /plugins.c | |
parent | 07a356a4c0e256f6da4be205a41e690193e174b8 (diff) |
fixed missing API 1.2 constant; fixed is_local_file implementation
Diffstat (limited to 'plugins.c')
-rw-r--r-- | plugins.c | 18 |
1 files changed, 15 insertions, 3 deletions
@@ -1275,9 +1275,21 @@ plug_is_local_file (const char *fname) { return 1; } - for (; *fname; fname++) { - if (!strncmp (fname, "://", 3)) { - return 0; + const char *f = fname; + for (; *f; f++) { + if (!strncmp (f, "://", 3)) { + DB_vfs_t **plug = plug_get_vfs_list (); + for (int i = 0; plug[i]; i++) { + if (plug[i]->get_schemes && plug[i]->is_streaming && plug[i]->is_streaming()) { + const char **sch = plug[i]->get_schemes (); + for (int k = 0; sch[k]; k++) { + if (!strncmp (sch[k], fname, strlen (sch[k]))) { + return 0; + } + } + } + } + break; } } |