aboutsummaryrefslogtreecommitdiff
path: root/libsylph/mh.c
diff options
context:
space:
mode:
Diffstat (limited to 'libsylph/mh.c')
-rw-r--r--libsylph/mh.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libsylph/mh.c b/libsylph/mh.c
index d3be1cf7..89ba6baa 100644
--- a/libsylph/mh.c
+++ b/libsylph/mh.c
@@ -1229,6 +1229,7 @@ static gint mh_create_tree(Folder *folder)
MAKE_DIR_IF_NOT_EXIST(QUEUE_DIR);
MAKE_DIR_IF_NOT_EXIST(DRAFT_DIR);
MAKE_DIR_IF_NOT_EXIST(TRASH_DIR);
+ MAKE_DIR_IF_NOT_EXIST(JUNK_DIR);
return 0;
}
@@ -1820,6 +1821,10 @@ static void mh_scan_tree_recursive(FolderItem *item)
!strcmp(dir_name, TRASH_DIR)) {
new_item->stype = F_TRASH;
folder->trash = new_item;
+ } else if (!folder_get_junk(folder) &&
+ !strcmp(dir_name, JUNK_DIR)) {
+ new_item->stype = F_JUNK;
+ folder_set_junk(folder, new_item);
}
}