2008-04-28 [colin] 3.4.0cvs16
authorColin Leroy <colin@colino.net>
Mon, 28 Apr 2008 06:37:42 +0000 (06:37 +0000)
committerColin Leroy <colin@colino.net>
Mon, 28 Apr 2008 06:37:42 +0000 (06:37 +0000)
* src/folder.c
Fix bug 1589, 'tagsdb file not removed when
folder deleted'.
* src/common/utils.c
Make sure claws_unlink accepts NULL arg.

ChangeLog
PATCHSETS
configure.ac
src/common/utils.c
src/folder.c

index 104dad6..bf1030e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2008-04-28 [colin]     3.4.0cvs16
+
+       * src/folder.c
+               Fix bug 1589, 'tagsdb file not removed when
+               folder deleted'.
+       * src/common/utils.c
+               Make sure claws_unlink accepts NULL arg.
+
 2008-04-25 [colin]     3.4.0cvs15
 
        * src/common/ssl.c
index ec15a25..561ec19 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.395.2.365 -r 1.395.2.366 src/summaryview.c;  ) > 3.4.0cvs13.patchset
 ( cvs diff -u -r 1.9.2.14 -r 1.9.2.15 src/addrindex.h;  cvs diff -u -r 1.9.2.26 -r 1.9.2.27 src/common/ssl.c;  cvs diff -u -r 1.4.2.26 -r 1.4.2.27 src/common/ssl_certificate.c;  ) > 3.4.0cvs14.patchset
 ( cvs diff -u -r 1.9.2.27 -r 1.9.2.28 src/common/ssl.c;  ) > 3.4.0cvs15.patchset
+( cvs diff -u -r 1.213.2.181 -r 1.213.2.182 src/folder.c;  cvs diff -u -r 1.36.2.137 -r 1.36.2.138 src/common/utils.c;  ) > 3.4.0cvs16.patchset
index cd7e067..c610ba2 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=4
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=15
+EXTRA_VERSION=16
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index a574c9b..5099be4 100644 (file)
@@ -5019,6 +5019,9 @@ int claws_unlink(const gchar *filename)
        static int found_shred = -1;
        static const gchar *args[4];
 
+       if (filename == NULL)
+               return 0;
+
        if (found_shred == -1) {
                /* init */
                args[0] = g_find_program_in_path("shred");
index 4a8143d..68d8b3f 100644 (file)
@@ -398,6 +398,7 @@ void folder_item_remove(FolderItem *item)
 {
        GNode *node, *start_node;
        FolderUpdateData hookdata;
+       gchar *tags_file = NULL;
 
        g_return_if_fail(item != NULL);
        g_return_if_fail(item->folder != NULL);
@@ -424,6 +425,10 @@ void folder_item_remove(FolderItem *item)
                msgcache_destroy(item->cache);
                item->cache = NULL;
        }
+       tags_file = folder_item_get_tags_file(item);
+       if (tags_file)
+               claws_unlink(tags_file);
+       g_free(tags_file);
 
        hookdata.folder = item->folder;
        hookdata.update_flags = FOLDER_TREE_CHANGED | FOLDER_REMOVE_FOLDERITEM;