[Commits] [SCM] claws branch, master, updated. 3.15.0-140-g130c1bd

mones at claws-mail.org mones at claws-mail.org
Thu Sep 21 10:25:01 CEST 2017


The branch, master has been updated
       via  130c1bd6b45d1c4333d43e97554c543945d33585 (commit)
      from  9270dc32a7f5754a42a66754937f5da43faf48d2 (commit)

Summary of changes:
 src/imap.c |   35 ++---------------------------------
 1 file changed, 2 insertions(+), 33 deletions(-)


- Log -----------------------------------------------------------------
commit 130c1bd6b45d1c4333d43e97554c543945d33585
Author: Ricardo Mones <ricardo at mones.org>
Date:   Wed Sep 20 22:06:03 2017 +0200

    Revert "Fix bug #3855: segfault at startup with old profile and IMAP account"
    
    Thanks to commit c3167bf1a4bf76a75813856d48e9d3c00f6c3849 which allows
    to access folder class functions at earlier stages without causing #3855.
    
    This reverts commit 667c9d3eaf0487193cc7873e6d3a63959a03d7f9.

diff --git a/src/imap.c b/src/imap.c
index 25bb283..0e1e777 100644
--- a/src/imap.c
+++ b/src/imap.c
@@ -77,8 +77,6 @@ typedef struct _IMAPSession	IMAPSession;
 typedef struct _IMAPNameSpace	IMAPNameSpace;
 typedef struct _IMAPFolderItem	IMAPFolderItem;
 
-#include "prefs_account.h"
-
 #define IMAP_FOLDER(obj)	((IMAPFolder *)obj)
 #define IMAP_FOLDER_ITEM(obj)	((IMAPFolderItem *)obj)
 #define IMAP_SESSION(obj)	((IMAPSession *)obj)
@@ -427,7 +425,6 @@ static gint imap_get_flags			(Folder 	*folder,
 						 FolderItem 	*item,
                     				 MsgInfoList 	*msglist,
 						 GHashTable 	*msgflags);
-static gchar *imap_folder_get_path		(Folder		*folder);
 static gchar *imap_item_get_path		(Folder		*folder,
 						 FolderItem	*item);
 static MsgInfo *imap_parse_msg(const gchar *file, FolderItem *item);
@@ -3045,35 +3042,6 @@ static FolderItem *imap_create_special_folder(Folder *folder,
 	return new_item;
 }
 
-static gchar *imap_folder_get_path(Folder *folder)
-{
-	gchar *folder_path;
-
-	g_return_val_if_fail(folder != NULL, NULL);
-        g_return_val_if_fail(folder->account != NULL, NULL);
-
-#ifdef G_OS_WIN32
-	gchar *sanitized_dirname = g_strdup(folder->account->recv_server);
-	g_strdelimit(sanitized_dirname, ":", ',');
-#endif
-
-        folder_path = g_strconcat(get_imap_cache_dir(),
-                                  G_DIR_SEPARATOR_S,
-#ifdef G_OS_WIN32
-																	sanitized_dirname,
-#else
-                                  folder->account->recv_server,
-#endif
-                                  G_DIR_SEPARATOR_S,
-                                  folder->account->userid,
-                                  NULL);
-
-#ifdef G_OS_WIN32
-	g_free(sanitized_dirname);
-#endif
-	return folder_path;
-}
-
 #ifdef G_OS_WIN32
 static gchar *imap_encode_unsafe_chars(const gchar *str)
 {
@@ -3110,8 +3078,9 @@ static gchar *imap_item_get_path(Folder *folder, FolderItem *item)
 	gchar *item_path = NULL;
 	
 	g_return_val_if_fail(folder != NULL, NULL);
+	g_return_val_if_fail(folder->account != NULL, NULL);
 	g_return_val_if_fail(item != NULL, NULL);
-	folder_path = imap_folder_get_path(folder);
+	folder_path = prefs_account_cache_dir(folder->account, FALSE);
 
 	g_return_val_if_fail(folder_path != NULL, NULL);
 

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


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list