changeset 2337:7d1dc0ca6df8 trunk

[svn] - special case for no uri schema
author nenolod
date Mon, 15 Jan 2007 08:51:37 -0800
parents b332cdd2ea43
children d0a04f1ee732
files ChangeLog src/audacious/vfs.c
diffstat 2 files changed, 14 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Mon Jan 15 08:48:46 2007 -0800
+++ b/ChangeLog	Mon Jan 15 08:51:37 2007 -0800
@@ -1,3 +1,11 @@
+2007-01-15 16:48:46 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
+  revision [3682]
+  - warning fixes
+  
+  trunk/src/audacious/vfs.c |    2 ++
+  1 file changed, 2 insertions(+)
+
+
 2007-01-15 16:44:39 +0000  William Pitcock <nenolod@sacredspiral.co.uk>
   revision [3680]
   - g_strsplit() wraps strsplit(3), and thus has different results on 
--- a/src/audacious/vfs.c	Mon Jan 15 08:48:46 2007 -0800
+++ b/src/audacious/vfs.c	Mon Jan 15 08:51:37 2007 -0800
@@ -79,6 +79,8 @@
     {
         vtable = (VFSConstructor *) node->data;
 
+        DBG("Does %s match %s?\n", decpath, vtable->uri_id);
+
         if (!strncasecmp(decpath, vtable->uri_id, strlen(vtable->uri_id)))
             break;
     }
@@ -87,7 +89,10 @@
     if (vtable == NULL)
         return NULL;
 
-    file = vtable->vfs_fopen_impl(decpath + strlen(vtable->uri_id), mode);
+    if (strlen(vtable->uri_id) > 1)
+        file = vtable->vfs_fopen_impl(decpath + strlen(vtable->uri_id), mode);
+    else
+        file = vtable->vfs_fopen_impl(decpath, mode);
 
     if (file == NULL)
         return NULL;