talons

Fork of Claws Mail https://www.claws-mail
Log | Files | Refs | README | LICENSE

commit da2e5b278414984a7ae44b5298460ada177f77de
parent 07e2cd579e80d80c2fc99ddc274364edf658a1aa
Author: Andrej Kacian <ticho@claws-mail.org>
Date:   Wed, 20 Jun 2012 20:12:54 +0000

2012-06-20 [ticho]	3.8.0cvs55

	* src/mh.c
		Fix for bug #1090 - Standard-folders appear again
		after rescanning tree

Diffstat:
MChangeLog | 6++++++
MPATCHSETS | 1+
Mconfigure.ac | 2+-
Msrc/mh.c | 43+++++++++++++++++++++++++++++++++++++------
4 files changed, 45 insertions(+), 7 deletions(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,9 @@ +2012-06-20 [ticho] 3.8.0cvs55 + + * src/mh.c + Fix for bug #1090 - Standard-folders appear again + after rescanning tree + 2012-06-20 [paul] 3.8.0cvs54 * src/prefs_common.c diff --git a/PATCHSETS b/PATCHSETS @@ -4371,3 +4371,4 @@ ( cvs diff -u -r 1.1.2.9 -r 1.1.2.10 doc/man/claws-mail.1; cvs diff -u -r 1.115.2.249 -r 1.115.2.250 src/main.c; cvs diff -u -r 1.7.2.20 -r 1.7.2.21 src/main.h; cvs diff -u -r 1.149.2.106 -r 1.149.2.107 src/inc.c; cvs diff -u -r 1.150.2.123 -r 1.150.2.124 src/procmsg.c; cvs diff -u -r 1.4.2.83 -r 1.4.2.84 src/gtk/about.c; ) > 3.8.0cvs52.patchset ( cvs diff -u -r 1.1.4.31 -r 1.1.4.32 src/gtk/progressdialog.c; ) > 3.8.0cvs53.patchset ( cvs diff -u -r 1.204.2.210 -r 1.204.2.211 src/prefs_common.c; cvs diff -u -r 1.103.2.138 -r 1.103.2.139 src/prefs_common.h; cvs diff -u -r 1.96.2.241 -r 1.96.2.242 src/textview.c; cvs diff -u -r 1.12.2.31 -r 1.12.2.32 src/textview.h; ) > 3.8.0cvs54.patchset +( cvs diff -u -r 1.79.2.72 -r 1.79.2.73 src/mh.c; ) > 3.8.0cvs55.patchset diff --git a/configure.ac b/configure.ac @@ -12,7 +12,7 @@ MINOR_VERSION=8 MICRO_VERSION=0 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=54 +EXTRA_VERSION=55 EXTRA_RELEASE= EXTRA_GTK2_VERSION= diff --git a/src/mh.c b/src/mh.c @@ -778,7 +778,7 @@ static gint mh_scan_tree(Folder *folder) static gint mh_create_tree(Folder *folder) { - gchar *rootpath; + gchar *rootpath, *f; cm_return_val_if_fail(folder != NULL, -1); @@ -786,11 +786,42 @@ static gint mh_create_tree(Folder *folder) rootpath = LOCAL_FOLDER(folder)->rootpath; MAKE_DIR_IF_NOT_EXIST(rootpath); CHDIR_RETURN_VAL_IF_FAIL(rootpath, -1); - MAKE_DIR_IF_NOT_EXIST(INBOX_DIR); - MAKE_DIR_IF_NOT_EXIST(OUTBOX_DIR); - MAKE_DIR_IF_NOT_EXIST(QUEUE_DIR); - MAKE_DIR_IF_NOT_EXIST(DRAFT_DIR); - MAKE_DIR_IF_NOT_EXIST(TRASH_DIR); + + /* Create special directories as needed */ + if (folder->inbox != NULL && + folder->inbox->path != NULL) + f = folder->inbox->path; + else + f = INBOX_DIR; + MAKE_DIR_IF_NOT_EXIST(f); + + if (folder->outbox != NULL && + folder->outbox->path != NULL) + f = folder->outbox->path; + else + f = OUTBOX_DIR; + MAKE_DIR_IF_NOT_EXIST(f); + + if (folder->draft != NULL && + folder->draft->path != NULL) + f = folder->draft->path; + else + f = DRAFT_DIR; + MAKE_DIR_IF_NOT_EXIST(f); + + if (folder->queue != NULL && + folder->queue->path != NULL) + f = folder->queue->path; + else + f = QUEUE_DIR; + MAKE_DIR_IF_NOT_EXIST(f); + + if (folder->trash != NULL && + folder->trash->path != NULL) + f = folder->trash->path; + else + f = TRASH_DIR; + MAKE_DIR_IF_NOT_EXIST(f); return 0; }