Webmail: fix encoding of subfolder name

Fixes #2637
pull/20/head
Francis Lachapelle 2014-03-06 09:27:43 -05:00
parent 0c99323db3
commit e4a21bcef5
3 changed files with 10 additions and 4 deletions

5
NEWS
View File

@ -1,5 +1,5 @@
2.2.0a (2014-03-XX)
-------------------
2.2.1 (2014-03-XX)
------------------
Enhancements
- updated Czech, Finnish, and Hungarian translations
@ -11,6 +11,7 @@ Bug fixes
- fixed sorting of events list by calendar name (#2629)
- fixed wrong date format leading to Android email syncing issues (#2609)
- fixed possible exception when retrieving the default event reminder value (#2624)
- fixed encoding of mail folder name when creating a subfolder (#2637)
2.2.0 (2014-02-24)
------------------

View File

@ -44,6 +44,7 @@
#import <NGImap4/NGImap4Connection.h>
#import <NGImap4/NGImap4Client.h>
#import <NGImap4/NSString+Imap4.h>
#import <SOGo/DOMNode+SOGo.h>
#import <SOGo/NSArray+Utilities.h>
@ -293,7 +294,7 @@ static NSString *defaultUserID = @"anyone";
destURL = [[NSURL alloc] initWithScheme: [imap4URL scheme]
host: [imap4URL host]
path: [NSString stringWithFormat: @"%@%@",
path, newName]];
path, [newName stringByEncodingImap4FolderName]]];
[destURL autorelease];
error = [imap4 moveMailboxAtURL: imap4URL
toURL: destURL];
@ -994,7 +995,7 @@ static NSString *defaultUserID = @"anyone";
if ([self imap4Connection])
{
error = [imap4 createMailbox: [self relativeImap4Name]
error = [imap4 createMailbox: [[self relativeImap4Name] stringByEncodingImap4FolderName]
atURL: [container imap4URL]];
if (error)
rc = NO;

View File

@ -28,8 +28,11 @@
#import <NGObjWeb/WOContext+SoObjects.h>
#import <NGObjWeb/WOResponse.h>
#import <NGObjWeb/WORequest.h>
#import <NGImap4/NGImap4Connection.h>
#import <NGImap4/NGImap4Client.h>
#import <NGImap4/NSString+Imap4.h>
#import <EOControl/EOQualifier.h>
#import <Mailer/SOGoMailAccount.h>
@ -60,6 +63,7 @@
folderName = [[context request] formValueForKey: @"name"];
if ([folderName length] > 0)
{
folderName = [folderName stringByEncodingImap4FolderName];
newFolder
= [co lookupName: [NSString stringWithFormat: @"folder%@", folderName]
inContext: context