[gnumeric] win32: try harder not to break file:// in gio.



commit 3f11a78596cbe32fefa759157e73953f1395d572
Author: Morten Welinder <terra gnome org>
Date:   Wed Jul 14 13:05:38 2010 -0400

    win32: try harder not to break file:// in gio.

 tools/win32/patches/glib-appinfo.patch |   13 +++++++++----
 1 files changed, 9 insertions(+), 4 deletions(-)
---
diff --git a/tools/win32/patches/glib-appinfo.patch b/tools/win32/patches/glib-appinfo.patch
index d6bc46c..b3d6e6d 100644
--- a/tools/win32/patches/glib-appinfo.patch
+++ b/tools/win32/patches/glib-appinfo.patch
@@ -252,9 +252,8 @@ diff -ur glib-2.24.0/gio/gwin32appinfo.c glib-2.24.0-fixed/gio/gwin32appinfo.c
        infos = g_list_prepend (infos, info);
        
        index++;
-diff -ur glib-2.24.0/gio/win32/gwinhttpvfs.c glib-2.24.0-fixed/gio/win32/gwinhttpvfs.c
 --- glib-2.24.0/gio/win32/gwinhttpvfs.c	2010-03-17 16:55:34.000000000 -0400
-+++ glib-2.24.0-fixed/gio/win32/gwinhttpvfs.c	2010-07-08 20:50:56.000000000 -0400
++++ glib-2.24.0-fixed/gio/win32/gwinhttpvfs.c	2010-07-11 20:32:36.000000000 -0400
 @@ -28,6 +28,7 @@
  
  #include "gioerror.h"
@@ -263,14 +262,20 @@ diff -ur glib-2.24.0/gio/win32/gwinhttpvfs.c glib-2.24.0-fixed/gio/win32/gwinhtt
  #include "gvfs.h"
  
  #include "gwinhttpfile.h"
-@@ -163,6 +164,12 @@
+@@ -163,6 +164,18 @@
          uri[strlen (winhttp_uri_schemes[i])] == ':')
        return _g_winhttp_file_new (winhttp_vfs, uri);
  
++  /* The only other kind of URI we handle is file:// and we do that
++     by shipping it off to the wrapped vfs.  Anything else that looks
++     plonk:// is turned into a dummy file.  That leaves anything that
++     looks, more or less, like a filename.  We ship that off to the
++     wrapped vfs because we used to.  */
 +  for (i = 0; g_ascii_isalpha (uri[i]); i++)
 +	  ; /* Nothing */
 +  if (i > 0 &&
-+      uri[i] == ':' && uri[i + 1] == '/' && uri[i + 2] == '/')
++      uri[i] == ':' && uri[i + 1] == '/' && uri[i + 2] == '/' &&
++      !(i == 4 && g_ascii_strncasecmp (uri, "file", 4) == 0))
 +    return _g_dummy_file_new (uri);
 +
    /* For other URIs fallback to the wrapped GVfs */



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]