Monotone-Parent: 31c616af5df5ea18c34f33008cee7ec5688b43ba

Monotone-Revision: 1c03128dc32222b38a2456aa650fb2b5a775c3a0

Monotone-Author: wsourdeau@inverse.ca
Monotone-Date: 2011-07-08T20:02:02
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
Wolfgang Sourdeau
2011-07-08 20:02:02 +00:00
parent dae4b362fa
commit 1cf68fa730
4 changed files with 18 additions and 3 deletions
+11
View File
@@ -1,5 +1,16 @@
2011-07-08 Wolfgang Sourdeau <wsourdeau@inverse.ca>
* OpenChange/MAPIStoreFolder.m (-initWithSOstringByAddingPercentEscapesUsingEncodinGoObject:inContainer:):
make use of -[NSString stringByAddingPercentEscapesUsingEncoding:]
to properly escape folder names with non-ascii characters.
* OpenChange/MAPIStoreFSFolder.m (-createFolder:withFID:): same as
above.
* OpenChange/MAPIStoreContext.m
(+contextFromURI:withConnectionInfo:andFID:inMemCtx:): same as
above.
* OpenChange/SOGoMAPIFSFolder.m (-initWithName:inContainer:):
added method to properly initialize the "directory" ivar when
initialized as a subfolder.
+1 -1
View File
@@ -161,7 +161,7 @@ _prepareContextClass (struct mapistore_context *newMemCtx,
completeURLString = [@"sogo://" stringByAppendingString: urlString];
if (![completeURLString hasSuffix: @"/"])
completeURLString = [completeURLString stringByAppendingString: @"/"];
baseURL = [NSURL URLWithString: completeURLString];
baseURL = [NSURL URLWithString: [completeURLString stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]];
if (baseURL)
{
module = [baseURL host];
+3 -1
View File
@@ -80,12 +80,14 @@ static Class MAPIStoreFSMessageK;
withFID: (uint64_t) newFID
{
NSString *newKey, *urlString;
NSURL *childURL;
SOGoMAPIFSFolder *childFolder;
newKey = [NSString stringWithFormat: @"0x%.16"PRIx64, (unsigned long long) newFID];
urlString = [NSString stringWithFormat: @"%@/%@", [self url], newKey];
childFolder = [SOGoMAPIFSFolder folderWithURL: [NSURL URLWithString: urlString]
childURL = [NSURL URLWithString: [urlString stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding]];
childFolder = [SOGoMAPIFSFolder folderWithURL: childURL
andTableType: MAPISTORE_MESSAGE_TABLE];
[childFolder ensureDirectory];
+3 -1
View File
@@ -118,10 +118,12 @@ Class NSExceptionK, MAPIStoreMessageTableK, MAPIStoreFAIMessageTableK, MAPIStore
inContainer: (MAPIStoreObject *) newContainer
{
NSURL *propsURL;
NSString *urlString;
if ((self = [super initWithSOGoObject: newSOGoObject inContainer: newContainer]))
{
propsURL = [NSURL URLWithString: [self url]];
urlString = [[self url] stringByAddingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
propsURL = [NSURL URLWithString: urlString];
ASSIGN (propsFolder,
[SOGoMAPIFSFolder folderWithURL: propsURL
andTableType: MAPISTORE_FOLDER_TABLE]);