[maemo-commits] [maemo-commits] r11202 - projects/haf/trunk/osso-gnome-vfs2/debian/patches

From: subversion at stage.maemo.org subversion at stage.maemo.org
Date: Mon Apr 23 17:23:24 EEST 2007
Author: martyn
Date: 2007-04-23 17:22:53 +0300 (Mon, 23 Apr 2007)
New Revision: 11202

Added:
   projects/haf/trunk/osso-gnome-vfs2/debian/patches/05-mime-case-and-query.patch
   projects/haf/trunk/osso-gnome-vfs2/debian/patches/29-inotify-add-umount-to-missing-list.patch
Removed:
   projects/haf/trunk/osso-gnome-vfs2/debian/patches/05-mime-case-and-query.diff
   projects/haf/trunk/osso-gnome-vfs2/debian/patches/29-inotify-add-umount-to-missing-list.diff
Log:
Fixed patch name extensions

Deleted: projects/haf/trunk/osso-gnome-vfs2/debian/patches/05-mime-case-and-query.diff
===================================================================
--- projects/haf/trunk/osso-gnome-vfs2/debian/patches/05-mime-case-and-query.diff	2007-04-23 14:21:07 UTC (rev 11201)
+++ projects/haf/trunk/osso-gnome-vfs2/debian/patches/05-mime-case-and-query.diff	2007-04-23 14:22:53 UTC (rev 11202)
@@ -1,96 +0,0 @@
---- libgnomevfs/gnome-vfs-mime.c-unmod	2007-02-01 17:00:23.000000000 +0100
-+++ libgnomevfs/gnome-vfs-mime.c	2007-02-01 17:38:39.000000000 +0100
-@@ -99,15 +99,21 @@ gnome_vfs_mime_type_from_name_or_default
- {
- 	const char *mime_type;
- 	const char *separator;
-+	char       *lower;
- 
- 	if (filename == NULL) {
- 		return defaultv;
- 	}
- 
--	separator = strrchr (filename, '/');
-+	/* Convert to lower case to implement a poor man's case insensitive mime
-+         * type lookup. See NB#18581.
-+         */
-+ 	lower = g_utf8_strdown (filename, -1);
-+
-+	separator = strrchr (lower, '/');
- #ifdef G_OS_WIN32
- 	{
--		const char *sep2 = strrchr (filename, '\\');
-+		const char *sep2 = strrchr (lower, '\\');
- 		if (separator == NULL ||
- 		    (sep2 != NULL && sep2 > separator))
- 			separator = sep2;
-@@ -115,16 +121,20 @@ gnome_vfs_mime_type_from_name_or_default
- #endif
- 	if (separator != NULL) {
- 		separator++;
--		if (*separator == '\000')
-+		if (*separator == '\000') {
-+			g_free (lower);
- 			return defaultv;
-+		}
- 	} else {
--		separator = filename;
-+		separator = lower;
- 	}
- 
- 	G_LOCK (gnome_vfs_mime_mutex);
- 	mime_type = xdg_mime_get_mime_type_from_file_name (separator);
- 	G_UNLOCK (gnome_vfs_mime_mutex);
- 
-+ 	g_free (lower);
-+
- 	if (mime_type)
- 		return mime_type;
- 	else
-@@ -209,20 +219,37 @@ gnome_vfs_get_mime_type_for_name_and_dat
- 	return mime_type;
- }
- 
-+static char *
-+strip_query (const char *path)
-+{
-+	const char *tmp;
-+
-+	tmp = strchr (path, '?');
-+	if (tmp == NULL) {
-+		return g_strdup (path);
-+	}
-+
-+	return g_strndup (path, tmp - path);
-+}
-+
- static const char *
- gnome_vfs_get_mime_type_from_uri_internal (GnomeVFSURI *uri)
- {
--	char *base_name;
-+	const char *path;
- 	const char *mime_type;
-+	char       *stripped;
- 
--	/* Return a mime type based on the file extension or NULL if no match. */
--	base_name = gnome_vfs_uri_extract_short_path_name (uri);
--	if (base_name == NULL) {
--		return NULL;
--	}
--
--	mime_type = gnome_vfs_mime_type_from_name_or_default (base_name, NULL);
--	g_free (base_name);
-+	/* Strip off any query string, see NB#19530. The reason we get the path
-+	 * instead of gnome_vfs_uri_extract_short_name is that the latter will
-+	 * do the wrong thing for things like: http://foo.bar/file?abc=/dsa/gfd
-+	 * (it will just take the last slash and return the part after it,
-+	 * instead of "file".
-+	 */
-+	path = gnome_vfs_uri_get_path (uri);
-+	stripped = strip_query (path);
-+	mime_type = gnome_vfs_mime_type_from_name_or_default (stripped, NULL);
-+	g_free (stripped);
-+	
- 	return mime_type;
- }
- 

Copied: projects/haf/trunk/osso-gnome-vfs2/debian/patches/05-mime-case-and-query.patch (from rev 11158, projects/haf/trunk/osso-gnome-vfs2/debian/patches/05-mime-case-and-query.diff)

Deleted: projects/haf/trunk/osso-gnome-vfs2/debian/patches/29-inotify-add-umount-to-missing-list.diff
===================================================================
--- projects/haf/trunk/osso-gnome-vfs2/debian/patches/29-inotify-add-umount-to-missing-list.diff	2007-04-23 14:21:07 UTC (rev 11201)
+++ projects/haf/trunk/osso-gnome-vfs2/debian/patches/29-inotify-add-umount-to-missing-list.diff	2007-04-23 14:22:53 UTC (rev 11202)
@@ -1,16 +0,0 @@
-Index: modules/inotify-path.c
-===================================================================
---- modules/inotify-path.c	(revision 5322)
-+++ modules/inotify-path.c	(working copy)
-@@ -376,8 +376,8 @@
- 	if (event->mask & IP_INOTIFY_MASK)
- 		ip_event_dispatch (dir_list, pair_dir_list, event);
- 
--	/* We have to manage the missing list when we get a DELETE event. */
--	if (event->mask & IN_DELETE_SELF || event->mask & IN_MOVE_SELF)
-+	/* We have to manage the missing list when we get a DELETE/UNMOUNT event. */
-+	if (event->mask & IN_DELETE_SELF || event->mask & IN_MOVE_SELF || event->mask & IN_UNMOUNT)
- 	{
- 		/* Add all subscriptions to missing list */
- 		g_list_foreach (dir_list, ip_wd_delete, NULL);
-

Copied: projects/haf/trunk/osso-gnome-vfs2/debian/patches/29-inotify-add-umount-to-missing-list.patch (from rev 11158, projects/haf/trunk/osso-gnome-vfs2/debian/patches/29-inotify-add-umount-to-missing-list.diff)


More information about the maemo-commits mailing list