Revert "Merge pull request #2 from Zentyal/jgarcia/fix-encoding-of-mapistoreuris"

This commit is contained in:
Jesús García Sáez
2014-03-19 17:19:07 +01:00
parent f76a6cfc96
commit 1a2fe8908b
2 changed files with 8 additions and 6 deletions

View File

@@ -365,21 +365,23 @@ static inline NSURL *CompleteURLFromMapistoreURI (const char *uri)
{
int rc;
NSString *objectURL, *url;
// TDB_DATA key, dbuf;
url = [contextUrl absoluteString];
url = [[contextUrl absoluteString]
stringByReplacingPercentEscapesUsingEncoding: NSUTF8StringEncoding];
objectURL = [[userContext mapping] urlFromID: fmid];
if (objectURL)
{
if ([objectURL hasPrefix: url])
{
*path = [[objectURL substringFromIndex: 7] asUnicodeInMemCtx: memCtx];
[self logWithFormat: @"found path '%s' for fmid 0x%.16"PRIx64"", *path, fmid];
[self logWithFormat: @"found path '%s' for fmid 0x%.16"PRIx64"", *path, fmid];
rc = MAPISTORE_SUCCESS;
}
else
{
[self logWithFormat: @"context (%@, %@) does not contain "
@"found fmid: 0x%.16"PRIx64"", objectURL, url, fmid];
[self logWithFormat: @"context (%@, %@) does not contain "
@"found fmid: 0x%.16"PRIx64"", objectURL, url, fmid];
*path = NULL;
rc = MAPISTORE_SUCCESS;
}