mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-03-30 02:22:47 +00:00
Monotone-Parent: ded960271197442de0917fc8f66509f7377b6a75
Monotone-Revision: 62face8d68b60cbdfeed3e1857fabd32fceffb4c Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-08-13T17:48:57 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
@@ -30,6 +30,8 @@
|
||||
|
||||
#import <NGExtensions/NSObject+Logs.h>
|
||||
|
||||
#import <SOGo/NSString+Utilities.h>
|
||||
|
||||
#import "MAPIStoreTypes.h"
|
||||
|
||||
#import "MAPIStoreMapping.h"
|
||||
@@ -209,13 +211,10 @@ MAPIStoreMappingTDBTraverse (TDB_CONTEXT *ctx, TDB_DATA data1, TDB_DATA data2,
|
||||
{
|
||||
NSArray *allKeys;
|
||||
NSUInteger count, max;
|
||||
NSString *currentKey, *keyEnd, *newKey;
|
||||
NSUInteger oldURLLength;
|
||||
NSString *currentKey, *newKey;
|
||||
NSNumber *idKey;
|
||||
TDB_DATA key, dbuf;
|
||||
|
||||
oldURLLength = [oldURL length];
|
||||
|
||||
allKeys = [reverseMapping allKeys];
|
||||
max = [allKeys count];
|
||||
for (count = 0; count < max; count++)
|
||||
@@ -223,8 +222,8 @@ MAPIStoreMappingTDBTraverse (TDB_CONTEXT *ctx, TDB_DATA data1, TDB_DATA data2,
|
||||
currentKey = [allKeys objectAtIndex: count];
|
||||
if ([currentKey hasPrefix: oldURL])
|
||||
{
|
||||
keyEnd = [currentKey substringFromIndex: oldURLLength];
|
||||
newKey = [NSString stringWithFormat: @"%@%@", urlString, keyEnd];
|
||||
newKey = [currentKey stringByReplacingPrefix: oldURL
|
||||
withPrefix: urlString];
|
||||
|
||||
idKey = [reverseMapping objectForKey: currentKey];
|
||||
[mapping setObject: newKey forKey: idKey];
|
||||
|
||||
Reference in New Issue
Block a user