[Gpg4win-commits] r1127 - in trunk: . patches/claws-mail-3.7.0

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Tue Mar 3 18:26:47 CET 2009


Author: colinleroy
Date: 2009-03-03 18:26:46 +0100 (Tue, 03 Mar 2009)
New Revision: 1127

Added:
   trunk/patches/claws-mail-3.7.0/07-bug_1865.patch
Modified:
   trunk/ChangeLog
Log:
2009-03-03  Colin Leroy  <colin at colino.net>

	* patches/claws-mail-3.7.0/07-bug_1865.patch
		Fix filtering rules after renaming IMAP account.


Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog	2009-03-03 17:07:56 UTC (rev 1126)
+++ trunk/ChangeLog	2009-03-03 17:26:46 UTC (rev 1127)
@@ -1,3 +1,8 @@
+2009-03-03  Colin Leroy  <colin at colino.net>
+
+	* patches/claws-mail-3.7.0/07-bug_1865.patch
+		Fix filtering rules after renaming IMAP account.
+
 2009-03-03  Werner Koch  <wk at g10code.com>
 
 	Release 1.9.14.

Added: trunk/patches/claws-mail-3.7.0/07-bug_1865.patch
===================================================================
--- trunk/patches/claws-mail-3.7.0/07-bug_1865.patch	2009-03-03 17:07:56 UTC (rev 1126)
+++ trunk/patches/claws-mail-3.7.0/07-bug_1865.patch	2009-03-03 17:26:46 UTC (rev 1127)
@@ -0,0 +1,82 @@
+#! /bin/sh
+patch -p0 -f $* < $0
+exit $?
+
+Index: src/prefs_filtering.c
+===================================================================
+RCS file: /srv/cvs/claws-mail/claws/src/prefs_filtering.c,v
+retrieving revision 1.59.2.78
+diff -u -p -u -r1.59.2.78 prefs_filtering.c
+--- src/prefs_filtering.c	23 Feb 2009 16:55:43 -0000	1.59.2.78
++++ src/prefs_filtering.c	3 Mar 2009 14:14:22 -0000
+@@ -653,9 +653,13 @@ static void rename_path(GSList * filters
+ 	gint oldpathlen;
+         GSList * action_cur;
+         GSList * cur;
+-
++	const gchar *separator=G_DIR_SEPARATOR_S;
++	gboolean matched = FALSE;
++#ifdef G_OS_WIN32
++again:
++#endif
+ 	oldpathlen = strlen(old_path);
+-	old_path_with_sep = g_strconcat(old_path,G_DIR_SEPARATOR_S,NULL);
++	old_path_with_sep = g_strconcat(old_path,separator,NULL);
+ 
+ 	for (cur = filters; cur != NULL; cur = cur->next) {
+ 		FilteringProp   *filtering = (FilteringProp *)cur->data;
+@@ -685,28 +689,30 @@ static void rename_path(GSList * filters
+                                         while (*base == G_DIR_SEPARATOR) base++;
+                                         if (*base == '\0')
+                                                 dest_path = g_strconcat(prefix,
+-                                                    G_DIR_SEPARATOR_S,
++                                                    separator,
+                                                     new_path, NULL);
+                                         else
+                                                 dest_path = g_strconcat(prefix,
+-                                                    G_DIR_SEPARATOR_S,
++                                                    separator,
+                                                     new_path,
+-                                                    G_DIR_SEPARATOR_S,
++                                                    separator,
+                                                     base, NULL);
+                                         
+                                         g_free(prefix);
+                                         g_free(action->destination);
+                                         action->destination = dest_path;
++					matched = TRUE;
+                                 } else { /* for non-leaf folders */
+                                         /* compare with trailing slash */
+                                         if (!strncmp(old_path_with_sep, action->destination, oldpathlen+1)) {
+                                                 
+                                                 suffix = action->destination + oldpathlen + 1;
+                                                 dest_path = g_strconcat(new_path,
+-                                                    G_DIR_SEPARATOR_S,
++                                                    separator,
+                                                     suffix, NULL);
+                                                 g_free(action->destination);
+                                                 action->destination = dest_path;
++						matched = TRUE;
+                                         }
+                                 }
+                         } else {
+@@ -715,10 +721,19 @@ static void rename_path(GSList * filters
+                                         dest_path = g_strdup(new_path);
+                                         g_free(action->destination);
+                                         action->destination = dest_path;
++					matched = TRUE;
+                                 }
+                         }
+                 }
+         }
++	
++	g_free(old_path_with_sep);
++#ifdef G_OS_WIN32
++	if (!strcmp(separator, G_DIR_SEPARATOR_S) && !matched) {
++		separator = "/";
++		goto again;
++	}
++#endif
+ }
+ 
+ static gboolean prefs_filtering_rename_path_func(GNode *node, gpointer data)


Property changes on: trunk/patches/claws-mail-3.7.0/07-bug_1865.patch
___________________________________________________________________
Name: svn:executable
   + *



More information about the Gpg4win-commits mailing list