r19279 - in /desktop/unstable/gnome-vfs/debian: changelog patches/17_xdg_utf8.patch patches/series
joss at users.alioth.debian.org
joss at users.alioth.debian.org
Wed Apr 1 15:47:47 UTC 2009
Author: joss
Date: Wed Apr 1 15:47:47 2009
New Revision: 19279
URL: http://svn.debian.org/wsvn/pkg-gnome/?sc=1&rev=19279
Log:
17_xdg_utf8.patch: new patch. Don't assume that filenames are UTF-8.
Closes: #521891.
Added:
desktop/unstable/gnome-vfs/debian/patches/17_xdg_utf8.patch
Modified:
desktop/unstable/gnome-vfs/debian/changelog
desktop/unstable/gnome-vfs/debian/patches/series
Modified: desktop/unstable/gnome-vfs/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-vfs/debian/changelog?rev=19279&op=diff
==============================================================================
--- desktop/unstable/gnome-vfs/debian/changelog (original)
+++ desktop/unstable/gnome-vfs/debian/changelog Wed Apr 1 15:47:47 2009
@@ -1,6 +1,8 @@
gnome-vfs (1:2.24.0-4) UNRELEASED; urgency=low
* Fix debug package section.
+ * 17_xdg_utf8.patch: new patch. Don't assume that filenames are UTF-8.
+ Closes: #521891.
-- Josselin Mouette <joss at debian.org> Fri, 20 Mar 2009 00:26:13 +0100
Added: desktop/unstable/gnome-vfs/debian/patches/17_xdg_utf8.patch
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-vfs/debian/patches/17_xdg_utf8.patch?rev=19279&op=file
==============================================================================
--- desktop/unstable/gnome-vfs/debian/patches/17_xdg_utf8.patch (added)
+++ desktop/unstable/gnome-vfs/debian/patches/17_xdg_utf8.patch Wed Apr 1 15:47:47 2009
@@ -1,0 +1,123 @@
+Debian #521891
+Ported from the gio similar change, in svn.g.o/glib commit r7784
+
+Index: gnome-vfs-2.24.0/libgnomevfs/xdgmimecache.c
+===================================================================
+--- gnome-vfs-2.24.0.orig/libgnomevfs/xdgmimecache.c 2009-04-01 17:44:24.772906060 +0200
++++ gnome-vfs-2.24.0/libgnomevfs/xdgmimecache.c 2009-04-01 17:44:45.412901924 +0200
+@@ -31,6 +31,7 @@
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
++#include <ctype.h>
+
+ #include <fcntl.h>
+ #include <unistd.h>
+@@ -439,7 +440,7 @@ static int
+ cache_glob_node_lookup_suffix (XdgMimeCache *cache,
+ xdg_uint32_t n_entries,
+ xdg_uint32_t offset,
+- xdg_unichar_t *file_name,
++ const char *file_name,
+ int len,
+ int ignore_case,
+ MimeWeight mime_types[],
+@@ -456,7 +457,7 @@ cache_glob_node_lookup_suffix (XdgMimeCa
+
+ character = file_name[len - 1];
+ if (ignore_case)
+- character = _xdg_ucs4_to_lower (character);
++ character = tolower (character);
+
+ assert (character != 0);
+
+@@ -511,11 +512,11 @@ cache_glob_node_lookup_suffix (XdgMimeCa
+ }
+
+ static int
+-cache_glob_lookup_suffix (xdg_unichar_t *file_name,
+- int len,
+- int ignore_case,
+- MimeWeight mime_types[],
+- int n_mime_types)
++cache_glob_lookup_suffix (const char *file_name,
++ int len,
++ int ignore_case,
++ MimeWeight mime_types[],
++ int n_mime_types)
+ {
+ int i, n;
+
+@@ -557,7 +558,6 @@ cache_glob_lookup_file_name (const char
+ MimeWeight mimes[10];
+ int n_mimes = 10;
+ int i;
+- xdg_unichar_t *ucs4;
+ int len;
+
+ assert (file_name != NULL && n_mime_types > 0);
+@@ -567,12 +567,11 @@ cache_glob_lookup_file_name (const char
+ if (n > 0)
+ return n;
+
+- ucs4 = _xdg_convert_to_ucs4 (file_name, &len);
+- n = cache_glob_lookup_suffix (ucs4, len, FALSE, mimes, n_mimes);
++ len = strlen (file_name);
++ n = cache_glob_lookup_suffix (file_name, len, FALSE, mimes, n_mimes);
+
+ if (n == 0)
+- n = cache_glob_lookup_suffix (ucs4, len, TRUE, mimes, n_mimes);
+- free(ucs4);
++ n = cache_glob_lookup_suffix (file_name, len, TRUE, mimes, n_mimes);
+
+ /* Last, try fnmatch */
+ if (n == 0)
+Index: gnome-vfs-2.24.0/libgnomevfs/xdgmimeglob.c
+===================================================================
+--- gnome-vfs-2.24.0.orig/libgnomevfs/xdgmimeglob.c 2009-04-01 17:44:21.300401174 +0200
++++ gnome-vfs-2.24.0/libgnomevfs/xdgmimeglob.c 2009-04-01 17:44:59.645455643 +0200
+@@ -36,6 +36,7 @@
+ #include <assert.h>
+ #include <string.h>
+ #include <fnmatch.h>
++#include <ctype.h>
+
+ #ifndef FALSE
+ #define FALSE (0)
+@@ -297,7 +298,7 @@ typedef struct {
+
+ static int
+ _xdg_glob_hash_node_lookup_file_name (XdgGlobHashNode *glob_hash_node,
+- xdg_unichar_t *file_name,
++ const char *file_name,
+ int len,
+ int ignore_case,
+ MimeWeight mime_types[],
+@@ -312,7 +313,7 @@ _xdg_glob_hash_node_lookup_file_name (Xd
+
+ character = file_name[len - 1];
+ if (ignore_case)
+- character = _xdg_ucs4_to_lower(character);
++ character = tolower(character);
+
+ for (node = glob_hash_node; node && character >= node->character; node = node->next)
+ {
+@@ -392,15 +393,13 @@ _xdg_glob_hash_lookup_file_name (XdgGlob
+ }
+ }
+
+- ucs4 = _xdg_convert_to_ucs4 (file_name, &len);
+- n = _xdg_glob_hash_node_lookup_file_name (glob_hash->simple_node, ucs4, len, FALSE,
++ len = strlen (file_name);
++ n = _xdg_glob_hash_node_lookup_file_name (glob_hash->simple_node, file_name, len, FALSE,
+ mimes, n_mimes);
+ if (n == 0)
+- n = _xdg_glob_hash_node_lookup_file_name (glob_hash->simple_node, ucs4, len, TRUE,
++ n = _xdg_glob_hash_node_lookup_file_name (glob_hash->simple_node, file_name, len, TRUE,
+ mimes, n_mimes);
+- free(ucs4);
+
+- /* FIXME: Not UTF-8 safe */
+ if (n == 0)
+ {
+ for (list = glob_hash->full_list; list && n < n_mime_types; list = list->next)
Modified: desktop/unstable/gnome-vfs/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-gnome/desktop/unstable/gnome-vfs/debian/patches/series?rev=19279&op=diff
==============================================================================
--- desktop/unstable/gnome-vfs/debian/patches/series (original)
+++ desktop/unstable/gnome-vfs/debian/patches/series Wed Apr 1 15:47:47 2009
@@ -13,6 +13,7 @@
14_app_cdda.patch
15_uuid_mount.patch
16_no_extra_dbus_messages.patch
+17_xdg_utf8.patch
19_hurd_path_max.patch
20_dont_register_keys_for_gaim.patch
22_ignore_inaccessible_volumes.patch
More information about the pkg-gnome-commits
mailing list