diff options
Diffstat (limited to 'libsylph/account.c')
-rw-r--r-- | libsylph/account.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/libsylph/account.c b/libsylph/account.c index 9c062ded..794a3003 100644 --- a/libsylph/account.c +++ b/libsylph/account.c @@ -371,10 +371,19 @@ FolderItem *account_get_special_folder(PrefsAccount *ac_prefs, } break; case F_QUEUE: - if (ac_prefs->folder) - item = FOLDER(ac_prefs->folder)->queue; - if (!item) - item = folder_get_default_queue(); + if (ac_prefs->set_queue_folder && ac_prefs->queue_folder) { + item = folder_find_item_from_identifier + (ac_prefs->queue_folder); + /* only allow queue-type folder */ + if (item && item->stype != F_QUEUE) + item = NULL; + } + if (!item) { + if (ac_prefs->folder) + item = FOLDER(ac_prefs->folder)->queue; + if (!item) + item = folder_get_default_queue(); + } break; case F_TRASH: if (ac_prefs->set_trash_folder && ac_prefs->trash_folder) { |