[Commits] [SCM] claws branch, new-rssyl, updated. 3.10.1-14-gc0514fa

Colin colin at claws-mail.org
Wed Jun 11 17:05:14 CEST 2014


The branch new-rssyl of project "claws" (Claws Mail) has been updated
       via  c0514faaddb5bd97f44197471018f711ec1f480a (commit)
      from  c8bf89787ebb9a05eb22373b628c2f7abee01915 (commit)


- Log -----------------------------------------------------------------
commit c0514faaddb5bd97f44197471018f711ec1f480a
Author: Colin Leroy <colin at colino.net>
Date:   Wed Jun 11 17:05:02 2014 +0200

    Migrate the old feeds' caches if possible.

diff --git a/src/plugins/rssyl/rssyl_update_format.c b/src/plugins/rssyl/rssyl_update_format.c
index 8284450..571eada 100644
--- a/src/plugins/rssyl/rssyl_update_format.c
+++ b/src/plugins/rssyl/rssyl_update_format.c
@@ -163,6 +163,12 @@ static void rssyl_update_format_func(FolderItem *item, gpointer data)
 
 		rssyl_update_format_move_contents(item, new_item);
 
+		/* destroy the new folder's cache so we'll re-read the migrated one */
+		if (new_item->cache) {
+			msgcache_destroy(new_item->cache);
+			new_item->cache = NULL;
+		}
+
 		/* Store folderlist with the new folder */
 		folder_item_scan(new_item);
 		folder_write_list();
@@ -246,8 +252,9 @@ static void rssyl_update_format_move_contents(FolderItem *olditem,
 			oldpath, newpath);
 
 	while ((fname = (gchar *)g_dir_read_name(d)) != NULL) {
+		gboolean migrate_file = to_number(fname) > 0 || strstr(fname, ".claws_") == fname;
 		fpath = g_strconcat(oldpath, G_DIR_SEPARATOR_S, fname, NULL);
-		if (to_number(fname) > 0 && g_file_test(fpath, G_FILE_TEST_IS_REGULAR)) {
+		if (migrate_file && g_file_test(fpath, G_FILE_TEST_IS_REGULAR)) {
 			nfpath = g_strconcat(newpath, G_DIR_SEPARATOR_S, fname, NULL);
 			move_file(fpath, nfpath, FALSE);
 			g_free(nfpath);

-----------------------------------------------------------------------

Summary of changes:
 src/plugins/rssyl/rssyl_update_format.c |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list