summaryrefslogtreecommitdiff
path: root/plugins.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-11-06 22:41:22 +0100
committerGravatar Alexey Yakovenko <waker@users.sourceforge.net>2013-11-06 22:41:22 +0100
commit4d1f330c0b4d15c834befa17d33558fb773d0259 (patch)
treee54fb59bba3faf2a58d5ce7e798e3cf2e3c823f2 /plugins.c
parent07a356a4c0e256f6da4be205a41e690193e174b8 (diff)
fixed missing API 1.2 constant; fixed is_local_file implementation
Diffstat (limited to 'plugins.c')
-rw-r--r--plugins.c18
1 files changed, 15 insertions, 3 deletions
diff --git a/plugins.c b/plugins.c
index 390fd07d..21de3b01 100644
--- a/plugins.c
+++ b/plugins.c
@@ -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;
}
}