[evolution-patches] 31745, hacky workaround for shell uri bugs



Plenty of discussion in the bug in question.

The problem is, the shell gets something like this from camel:

physical = imap://user host/%23mh/folder
path = /#imap/folder
name = folder

and uses the 'path' part directly in its own uri formation, rather than
the encoded uri path.

e.g. e-shell-view.c:switch_on_folder_tree_click()

uri = g_strconcat(E_SHELL_URI_PREFIX, path, NULL);

thus forming a non-encoded/invalid uri.  its actually the 'view
fragment' (?) code (in display_uri() of the same file) that stops this
working though (since the path is used as a strcmp in most places
'safely').

This is a quick and dirty workaround, since the problem seems to be
pretty major/indemic in the shell code.  However, the main caveat would
be that if we put the patch in, it will affect users when we later fix
it properly (filters, and imap cache, etc).

It just strips any '#'s from the namespace component which is exported
via uri's and paths (not heavily tested, but i could access mail using
it).  It could create a namespace clash, but not very likely i'd say,
and so could any other scheme.

I moved the bug to 1.4.x territory because it makes evolution useless
for some users.

Index: ChangeLog
===================================================================
RCS file: /cvs/gnome/evolution/camel/ChangeLog,v
retrieving revision 1.1829
diff -u -3 -r1.1829 ChangeLog
--- ChangeLog	13 Jun 2003 19:06:50 -0000	1.1829
+++ ChangeLog	16 Jun 2003 07:33:22 -0000
@@ -1,3 +1,22 @@
+2003-06-16  Not Zed  <NotZed Ximian com>
+
+	** See bug #31745
+
+	* providers/imap/camel-imap-store-summary.c
+	(camel_imap_store_summary_namespace_new): Workaround a shell bug -
+	if the namespace has '#' in it, then strip it.
+
+	** See bug #44322
+	
+	* providers/imap/camel-imap-command.c (imap_command_strdup_vprintf):
+	If we are outputting a folder name, make sure we calculate buffer
+	size based on the raw/utf7 version
+
+	** See bug #44121
+	
+	* camel-multipart-signed.c (signed_get_part): If we can't parse
+	the content, but we have a stream, just use that as the content.
+
 2003-06-05  Jeffrey Stedfast  <fejj ximian com>
 
 	Fix for bug #40788.
Index: providers/imap/camel-imap-store-summary.c
===================================================================
RCS file: /cvs/gnome/evolution/camel/providers/imap/camel-imap-store-summary.c,v
retrieving revision 1.6
diff -u -3 -r1.6 camel-imap-store-summary.c
--- providers/imap/camel-imap-store-summary.c	4 Dec 2002 16:17:02 -0000	1.6
+++ providers/imap/camel-imap-store-summary.c	16 Jun 2003 07:33:23 -0000
@@ -364,7 +364,7 @@
 CamelImapStoreNamespace *camel_imap_store_summary_namespace_new(CamelImapStoreSummary *s, const char *full_name, char dir_sep)
 {
 	CamelImapStoreNamespace *ns;
-	char *p;
+	char *p, *o, c;
 	int len;
 
 	ns = g_malloc0(sizeof(*ns));
@@ -374,12 +374,15 @@
 		ns->full_name[len] = 0;
 	ns->sep = dir_sep;
 
-	p = ns->path = camel_imap_store_summary_full_to_path(s, ns->full_name, dir_sep);
-	while (*p) {
-		if (*p == '/')
-			*p = '.';
-		p++;
+	o = p = ns->path = camel_imap_store_summary_full_to_path(s, ns->full_name, dir_sep);
+	while ((c = *p++)) {
+		if (c != '#') {
+			if (c == '/')
+				c = '.';
+			*o++ = c;
+		}
 	}
+	*o = 0;
 
 	return ns;
 }


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