From bd577fd5131cc361fafbbc522e63450ac2b0ae46 Mon Sep 17 00:00:00 2001 From: Francis Lachapelle Date: Thu, 13 Mar 2014 08:41:42 -0400 Subject: [PATCH] Fix unseen count of folders beginning with a digit Fixes #2652 --- NEWS | 1 + UI/MailerUI/UIxMailFolderActions.m | 1 + UI/MailerUI/UIxMailMainFrame.m | 4 +++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/NEWS b/NEWS index cd2e427b2..546570c21 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,7 @@ Bug fixes - fixed possible exception when retrieving the default event reminder value on 64bit architectures (#2647, #2648) - disable file paste support in mail editor (#2641) - fixed copying/moving messages to a mail folder begining with a digit (#2658) + - fixed unseen count for folders beginning with a digit and used in Sieve filters (#2652) 2.2.1 (2014-03-07) ------------------ diff --git a/UI/MailerUI/UIxMailFolderActions.m b/UI/MailerUI/UIxMailFolderActions.m index ebb7612a7..0e1ca9123 100644 --- a/UI/MailerUI/UIxMailFolderActions.m +++ b/UI/MailerUI/UIxMailFolderActions.m @@ -41,6 +41,7 @@ #import #import +#import #import #import #import diff --git a/UI/MailerUI/UIxMailMainFrame.m b/UI/MailerUI/UIxMailMainFrame.m index dd8aca949..d87fa20af 100644 --- a/UI/MailerUI/UIxMailMainFrame.m +++ b/UI/MailerUI/UIxMailMainFrame.m @@ -640,6 +640,7 @@ NSDictionary *d, *action; NSMutableArray *folders; NSMutableString *path; + NSString *component; SOGoUserDefaults *ud; NSString *s; NSUInteger i, j, k; @@ -676,7 +677,8 @@ for (k = 0; k < [pathComponents count]; k++) { - [path appendFormat: @"folder%@", [[pathComponents objectAtIndex: k] asCSSIdentifier]]; + component = [NSString stringWithFormat: @"folder%@", [pathComponents objectAtIndex: k]]; + [path appendString: [component asCSSIdentifier]]; if (k < [pathComponents count] - 1) [path appendString: @"/"]; }