Bug 1090 - Standard-folders appear again after rescanning tree
Summary: Standard-folders appear again after rescanning tree
Status: RESOLVED FIXED
Alias: None
Product: Claws Mail (GTK 2)
Classification: Unclassified
Component: Folders/MH (show other bugs)
Version: other
Hardware: PC Linux
: P3 normal
Assignee: users
URL:
Depends on:
Blocks:
 
Reported: 2007-01-05 16:37 UTC by Roland
Modified: 2012-06-20 22:14 UTC (History)
1 user (show)

See Also:


Attachments
Proper fix (1.33 KB, patch)
2012-06-20 22:06 UTC, Andrej Kacian
no flags Details | Diff

Description Roland 2007-01-05 16:37:46 UTC
I configured my standard-folders (inbox, trash, ...) in a subfolder
of my mh-box. 

After I scanned for new folders the standard-folders appeared again in
the root-tree (only the folders with specific names, but without
specific functions). This is reproducible in claws 2.7.0-rc2 under
Ubuntu Edgy
Comment 1 Colin Leroy 2007-01-05 21:34:04 UTC
Note to anyone who'd want to fix it:

Hairy problem. When rescanning a folder, Claws removes the old node from the folder tree (referencing the prefs and settings), re-gets the whole tree, and re-applies the prefs. It means that folder->inbox = NULL, same for ->queue and all.

No idea how to fix it yet, postponing until after 2.7 at least - because it's a complicated but not big problem.
Comment 2 Andrej Kacian 2012-06-05 17:07:15 UTC
It seems to me that following simple patch fixes the issue:

Index: src/mh.c
===================================================================
RCS file: /home/claws-mail/claws/src/mh.c,v
retrieving revision 1.79.2.72
diff -u -r1.79.2.72 mh.c
--- src/mh.c    27 May 2012 17:30:52 -0000      1.79.2.72
+++ src/mh.c    5 Jun 2012 15:06:24 -0000
@@ -756,7 +756,6 @@
        }
        g_free(rootpath);
 
-       mh_create_tree(folder);
        mh_remove_missing_folder_items(folder);
        mh_scan_tree_recursive(item);
Comment 3 Andrej Kacian 2012-06-20 22:06:03 UTC
Created attachment 1118 [details]
Proper fix

Attached patch solves this more properly (i.e. creating special dirs as necessary, instead of not caring at all if any of them is missing).
Comment 4 users 2012-06-20 22:14:34 UTC
Changes related to this bug have been committed.
Please check latest CVS and update the bug accordingly.
You can also get the patch from:
http://www.claws-mail.org/tracker/

2012-06-20 [ticho]	3.8.0cvs55

	* src/mh.c
		Fix for bug #1090 - Standard-folders appear again
		after rescanning tree
Comment 5 Andrej Kacian 2012-06-20 22:14:36 UTC
Fix committed to CVS, with some additional checks compared to the patch.

Note You need to log in before you can comment on or make changes to this bug.