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.
This commit is contained in:
Enrique J. Hernández Blasco
2015-01-28 11:26:56 +01:00
parent 2dcb8fa732
commit 57d591c427
5 changed files with 16 additions and 2 deletions
+2 -1
View File
@@ -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: @"%@%@/",
+2 -1
View File
@@ -1286,7 +1286,8 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP)
[dbFolder changePathTo: [NSString stringWithFormat:
@"%@/folder%@",
parentDBFolderPath,
newFolderDBName]];
newFolderDBName]
intoNewContainer: [targetFolder dbFolder]];
}
}
else
+2
View File
@@ -49,6 +49,8 @@
andSortOrderings: (NSArray *) sortOrderings;
- (void) changePathTo: (NSString *) newPath;
- (void) changePathTo: (NSString *) newPath
intoNewContainer: (id) newContainer;
@end
+8
View File
@@ -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
// {
+2
View File
@@ -82,6 +82,8 @@
- (BOOL) isInPublicZone;
- (BOOL) doesRetainContainer;
/* accessors */
- (void) setContext: (WOContext *) newContext;