[evolution-data-server] Fix division-by-zero in imapx message fetch
- From: David Woodhouse <dwmw2 src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server] Fix division-by-zero in imapx message fetch
- Date: Thu, 24 Jun 2010 13:00:56 +0000 (UTC)
commit 79107d2547812926f51343b23e551da794f2a8a7
Author: David Woodhouse <David Woodhouse intel com>
Date: Tue Jun 22 11:04:06 2010 +0100
Fix division-by-zero in imapx message fetch
Use ifolder->exists_on_server, not imap->exists (which could have come
from a STATUS command and be the value for some other folder).
And it's possible to get here when we thought there were no messages, so
add ?:1 to avoid the division by zero in that case too.
camel/providers/imapx/camel-imapx-server.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
---
diff --git a/camel/providers/imapx/camel-imapx-server.c b/camel/providers/imapx/camel-imapx-server.c
index 589b9ea..a6e6be1 100644
--- a/camel/providers/imapx/camel-imapx-server.c
+++ b/camel/providers/imapx/camel-imapx-server.c
@@ -1352,7 +1352,8 @@ imapx_untagged(CamelIMAPXServer *imap, CamelException *ex)
}
if (job->op)
- camel_operation_progress (job->op, (camel_folder_summary_count (job->folder->summary) * 100)/imap->exists);
+ camel_operation_progress (job->op, (camel_folder_summary_count (job->folder->summary)
+ * 100)/ifolder->exists_on_server?:1);
}
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]