aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2012-03-26 09:08:59 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2012-03-26 09:08:59 +0000
commit2acdfda27249bb92c32b6a6e108bf0fc5b31a941 (patch)
treeb78216a94ba09c884fa1bde42ecd4cf5764d0630
parent1870cab997b57fbe9f33da45ad7464054006b4a3 (diff)
referch message when imap/news cache file size is 0 (Bug #50).
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3034 ee746299-78ed-0310-b773-934348b2243d
-rw-r--r--ChangeLog6
-rw-r--r--libsylph/imap.c2
-rw-r--r--libsylph/news.c2
3 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 10dbca9f..e9f1e59a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
2012-03-26
+ * libsylph/news.c: news_fetch_msg()
+ libsylph/imap.c: imap_fetch_msg(): referch message when cache
+ file size is 0 (Bug #50).
+
+2012-03-26
+
* libsylph/defs.h: removed direct inclusion of <glibconfig.h> and
<glib/gwin32.h> (fixes Bug #53).
diff --git a/libsylph/imap.c b/libsylph/imap.c
index 26c9f7ff..2ec7d0b9 100644
--- a/libsylph/imap.c
+++ b/libsylph/imap.c
@@ -1259,7 +1259,7 @@ static gchar *imap_fetch_msg(Folder *folder, FolderItem *item, gint uid)
filename = g_strconcat(path, G_DIR_SEPARATOR_S, nstr, NULL);
g_free(path);
- if (is_file_exist(filename)) {
+ if (is_file_exist(filename) && get_file_size(filename) > 0) {
debug_print("message %u has been already cached.\n", uid32);
return filename;
}
diff --git a/libsylph/news.c b/libsylph/news.c
index c4814dd2..82bf01c4 100644
--- a/libsylph/news.c
+++ b/libsylph/news.c
@@ -400,7 +400,7 @@ static gchar *news_fetch_msg(Folder *folder, FolderItem *item, gint num)
NULL);
g_free(path);
- if (is_file_exist(filename)) {
+ if (is_file_exist(filename) && get_file_size(filename) > 0) {
debug_print(_("article %d has been already cached.\n"), num);
return filename;
}