oc: Set right container in dbFolder when moving a folder
The path attribute from SOGoCacheGCSFolder is properly updated in the database but not when returning from path message as the container is the old one.pull/69/head
parent
2dcb8fa732
commit
57d591c427
|
@ -152,7 +152,8 @@ static NSString *MAPIStoreRightFolderContact = @"RightsFolderContact";
|
|||
targetPath = [[targetFolder sogoObject] path];
|
||||
newPath = [NSString stringWithFormat: @"%@/%@",
|
||||
targetPath, pathComponent];
|
||||
[dbFolder changePathTo: newPath];
|
||||
[dbFolder changePathTo: newPath
|
||||
intoNewContainer: [targetFolder dbFolder]];
|
||||
|
||||
mapping = [self mapping];
|
||||
newURL = [NSString stringWithFormat: @"%@%@/",
|
||||
|
|
|
@ -1286,7 +1286,8 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP)
|
|||
[dbFolder changePathTo: [NSString stringWithFormat:
|
||||
@"%@/folder%@",
|
||||
parentDBFolderPath,
|
||||
newFolderDBName]];
|
||||
newFolderDBName]
|
||||
intoNewContainer: [targetFolder dbFolder]];
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -49,6 +49,8 @@
|
|||
andSortOrderings: (NSArray *) sortOrderings;
|
||||
|
||||
- (void) changePathTo: (NSString *) newPath;
|
||||
- (void) changePathTo: (NSString *) newPath
|
||||
intoNewContainer: (id) newContainer;
|
||||
|
||||
@end
|
||||
|
||||
|
|
|
@ -308,6 +308,14 @@ Class SOGoCacheGCSObjectK = Nil;
|
|||
[super changePathTo: newPath];
|
||||
}
|
||||
|
||||
- (void) changePathTo: (NSString *) newPath intoNewContainer: (id) newContainer
|
||||
{
|
||||
[self changePathTo: newPath];
|
||||
container = newContainer;
|
||||
if ([self doesRetainContainer])
|
||||
[container retain];
|
||||
}
|
||||
|
||||
// - (NSArray *) toOneRelationshipKeysMatchingQualifier: (EOQualifier *) qualifier
|
||||
// andSortOrderings: (NSArray *) sortOrderings
|
||||
// {
|
||||
|
|
|
@ -82,6 +82,8 @@
|
|||
|
||||
- (BOOL) isInPublicZone;
|
||||
|
||||
- (BOOL) doesRetainContainer;
|
||||
|
||||
/* accessors */
|
||||
|
||||
- (void) setContext: (WOContext *) newContext;
|
||||
|
|
Loading…
Reference in New Issue