aboutsummaryrefslogtreecommitdiff
path: root/libsylph
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2014-04-11 04:31:36 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2014-04-11 04:31:36 +0000
commitd6433225cb188bace23a80686df3be09edaa6036 (patch)
tree25c9c1cc26b2530792d023b6ef92351edc4399ca /libsylph
parent61812cb57124f0c6fd144f7bd751c97a22b99f5d (diff)
fixed a bug that new/unread/total numbers in folderlist.xml was corrupted if sizeof(time_t) is 8 on 32-bit (such as recent version of mingw32).
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@3384 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph')
-rw-r--r--libsylph/folder.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/libsylph/folder.c b/libsylph/folder.c
index d67d61b1..0299fc5e 100644
--- a/libsylph/folder.c
+++ b/libsylph/folder.c
@@ -1634,7 +1634,7 @@ static gboolean folder_build_tree(GNode *node, gpointer data)
#endif
path = attr->value;
} else if (!strcmp(attr->name, "mtime"))
- mtime = strtoul(attr->value, NULL, 10);
+ mtime = strtoull(attr->value, NULL, 10);
else if (!strcmp(attr->name, "new"))
new = atoi(attr->value);
else if (!strcmp(attr->name, "unread"))
@@ -1945,8 +1945,8 @@ static void folder_write_list_recursive(GNode *node, gpointer data)
}
fprintf(fp,
- " mtime=\"%lu\" new=\"%d\" unread=\"%d\" total=\"%d\"",
- item->mtime, item->new, item->unread, item->total);
+ " mtime=\"%llu\" new=\"%d\" unread=\"%d\" total=\"%d\"",
+ (guint64)item->mtime, item->new, item->unread, item->total);
if (item->account)
fprintf(fp, " account_id=\"%d\"",