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 | |
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
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | ChangeLog.ja | 6 | ||||
-rw-r--r-- | libsylph/imap.c | 6 | ||||
-rw-r--r-- | libsylph/news.c | 6 |
4 files changed, 24 insertions, 0 deletions
@@ -1,3 +1,9 @@ +2008-11-28 + + * libsylph/news.c + libsylph/imap.c: when removing news/imap accounts, remove cache + directory with server name if it becomes empty. + 2008-11-27 * src/foldersel.c: only expand folders which are expanded in the diff --git a/ChangeLog.ja b/ChangeLog.ja index 6beec5e3..b01bc8a9 100644 --- a/ChangeLog.ja +++ b/ChangeLog.ja @@ -1,3 +1,9 @@ +2008-11-28 + + * libsylph/news.c + libsylph/imap.c: news/imap アカウントを削除するとき、サーバ名 + のキャッシュディレクトリが空になったら削除するようにした。 + 2008-11-27 * src/foldersel.c: フォルダビューで展開されているフォルダのみ展開 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)); } |