Monotone-Parent: 070788cd67236498278b572e2fac73279fe07d2d
Monotone-Revision: 47d9386ed0d68b0a3585c58826ca285b428390ff Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2010-10-13T15:55:21 Monotone-Branch: ca.inverse.sogo
This commit is contained in:
parent
de1a3cbbf7
commit
0c1c5eb9aa
|
@ -648,7 +648,9 @@ static MAPIStoreMapping *mapping = nil;
|
|||
{
|
||||
openchangedb_get_new_folderID (ldbCtx, &mappingId);
|
||||
[mapping registerURL: childURL withID: mappingId];
|
||||
mapistore_search_context_by_uri (memCtx, [childURL UTF8String], &contextId);
|
||||
mapistore_search_context_by_uri (memCtx,
|
||||
[[mapping urlFromID: fid] UTF8String],
|
||||
&contextId);
|
||||
mapistore_indexing_record_add_mid (memCtx, contextId, mappingId);
|
||||
}
|
||||
*data = MAPILongLongValue (memCtx, mappingId);
|
||||
|
@ -744,7 +746,9 @@ static MAPIStoreMapping *mapping = nil;
|
|||
{
|
||||
openchangedb_get_new_folderID (ldbCtx, &mappingId);
|
||||
[mapping registerURL: childURL withID: mappingId];
|
||||
mapistore_search_context_by_uri (memCtx, [childURL UTF8String], &contextId);
|
||||
mapistore_search_context_by_uri (memCtx,
|
||||
[[mapping urlFromID: fid] UTF8String],
|
||||
&contextId);
|
||||
mapistore_indexing_record_add_fid (memCtx, contextId, mappingId);
|
||||
}
|
||||
// mappingId = [mapping idFromURL: childURL];
|
||||
|
@ -756,15 +760,19 @@ static MAPIStoreMapping *mapping = nil;
|
|||
if (parentURL)
|
||||
{
|
||||
mappingId = [mapping idFromURL: parentURL];
|
||||
if (mappingId == NSNotFound)
|
||||
{
|
||||
openchangedb_get_new_folderID (ldbCtx, &mappingId);
|
||||
[mapping registerURL: childURL withID: mappingId];
|
||||
mapistore_search_context_by_uri (memCtx, [childURL UTF8String], &contextId);
|
||||
mapistore_indexing_record_add_fid (memCtx, contextId, mappingId);
|
||||
// [mapping registerURL: parentURL];
|
||||
// mappingId = [mapping idFromURL: parentURL];
|
||||
}
|
||||
NSAssert (mappingId != NSNotFound,
|
||||
@"parent folder should be known at this stage");
|
||||
// if (mappingId == NSNotFound)
|
||||
// {
|
||||
// [NSException raise: @"MAPIStoreSOGoException"
|
||||
// format: @"This should never happen"
|
||||
// // openchangedb_get_new_folderID (ldbCtx, &mappingId);
|
||||
// // [mapping registerURL: childURL withID: mappingId];
|
||||
// // mapistore_search_context_by_uri (memCtx, [childURL UTF8String], &contextId);
|
||||
// // mapistore_indexing_record_add_fid (memCtx, contextId, mappingId);
|
||||
// // [mapping registerURL: parentURL];
|
||||
// // mappingId = [mapping idFromURL: parentURL];
|
||||
// }
|
||||
*data = MAPILongLongValue (memCtx, mappingId);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue