diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2008-11-28 04:52:09 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2008-11-28 04:52:09 +0000 |
commit | 10957202cba805e0d4e72a0330b3018952f9ac50 (patch) | |
tree | dc1b1c54c7551ce60c2898a1c04d02d05b05fcff /libsylph | |
parent | c11794a58cf57fb1b1e5be8cb17d96a1040671d6 (diff) |
when removing news/imap accounts, remove cache directory with server name if it becomes empty.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@2084 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph')
-rw-r--r-- | libsylph/imap.c | 6 | ||||
-rw-r--r-- | libsylph/news.c | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/libsylph/imap.c b/libsylph/imap.c index c031acc5..502fcc39 100644 --- a/libsylph/imap.c +++ b/libsylph/imap.c @@ -438,6 +438,12 @@ static void imap_folder_destroy(Folder *folder) remove_dir_recursive(dir); g_free(dir); + dir = g_strconcat(get_imap_cache_dir(), G_DIR_SEPARATOR_S, + folder->account->recv_server, NULL); + if (is_dir_exist(dir)) + g_rmdir(dir); + g_free(dir); + folder_remote_folder_destroy(REMOTE_FOLDER(folder)); } diff --git a/libsylph/news.c b/libsylph/news.c index 3a0ab688..a331d4b5 100644 --- a/libsylph/news.c +++ b/libsylph/news.c @@ -181,6 +181,12 @@ static void news_folder_destroy(Folder *folder) remove_dir_recursive(dir); g_free(dir); + dir = g_strconcat(get_news_cache_dir(), G_DIR_SEPARATOR_S, + folder->account->nntp_server, NULL); + if (is_dir_exist(dir)) + g_rmdir(dir); + g_free(dir); + folder_remote_folder_destroy(REMOTE_FOLDER(folder)); } |