Monotone-Parent: 62face8d68b60cbdfeed3e1857fabd32fceffb4c
Monotone-Revision: daeccf44f2750bfeb36858cb6386c86f90cc252a Monotone-Author: wsourdeau@inverse.ca Monotone-Date: 2012-08-13T17:49:50 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
db43dcdd0d
commit
c4ad9891b3
|
@ -1,5 +1,8 @@
|
|||
2012-08-13 Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
|
||||
* OpenChange/MAPIStoreMailFolder.m (-moveToFolder:withNewName:):
|
||||
invoke changePathTo: on the dbFolder.
|
||||
|
||||
* OpenChange/SOGoMAPIDBFolder.m (-changePathTo:): overriden method
|
||||
in order to update children records too.
|
||||
|
||||
|
|
|
@ -55,6 +55,7 @@
|
|||
#import "NSData+MAPIStore.h"
|
||||
#import "NSString+MAPIStore.h"
|
||||
#import "SOGoMAPIDBMessage.h"
|
||||
#import "SOGoMAPIDBFolder.h"
|
||||
|
||||
#import "MAPIStoreMailVolatileMessage.h"
|
||||
|
||||
|
@ -1014,7 +1015,7 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP)
|
|||
enum mapistore_error rc;
|
||||
NSURL *folderURL, *newFolderURL;
|
||||
SOGoMailFolder *targetSOGoFolder;
|
||||
NSString *newURL;
|
||||
NSString *newURL, *parentDBFolderPath;
|
||||
NSException *error;
|
||||
MAPIStoreMapping *mapping;
|
||||
|
||||
|
@ -1024,6 +1025,7 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP)
|
|||
if (!newFolderName)
|
||||
newFolderName = [[sogoObject nameInContainer]
|
||||
substringFromIndex: 6]; /* length of "folder" */
|
||||
newFolderName = [newFolderName stringByEscapingURL];
|
||||
targetSOGoFolder = [targetFolder sogoObject];
|
||||
newFolderURL = [NSURL URLWithString: newFolderName
|
||||
relativeToURL: [targetSOGoFolder imap4URL]];
|
||||
|
@ -1037,10 +1039,16 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP)
|
|||
rc = MAPISTORE_SUCCESS;
|
||||
mapping = [self mapping];
|
||||
newURL = [NSString stringWithFormat: @"%@folder%@/",
|
||||
[targetFolder url],
|
||||
[newFolderName stringByEscapingURL]];
|
||||
[targetFolder url], newFolderName];
|
||||
[mapping updateID: [self objectId]
|
||||
withURL: newURL];
|
||||
parentDBFolderPath = [[targetFolder dbFolder] path];
|
||||
if (!parentDBFolderPath)
|
||||
parentDBFolderPath = @"";
|
||||
[dbFolder changePathTo: [NSString stringWithFormat:
|
||||
@"%@/folder%@",
|
||||
parentDBFolderPath,
|
||||
newFolderName]];
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1086,8 +1094,6 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP)
|
|||
[roles addObject: SOGoRole_ObjectViewer];
|
||||
if (rights & RightsCreateSubfolders)
|
||||
[roles addObject: SOGoRole_FolderCreator];
|
||||
if (rights & RightsCreateSubfolders)
|
||||
[roles addObject: SOGoRole_FolderCreator];
|
||||
|
||||
// [self logWithFormat: @"roles for rights %.8x = (%@)", rights, roles];
|
||||
|
||||
|
@ -1112,8 +1118,6 @@ _parseCOPYUID (NSString *line, NSArray **destUIDsP)
|
|||
rights |= RightsReadItems;
|
||||
if ([roles containsObject: SOGoRole_FolderCreator])
|
||||
rights |= RightsCreateSubfolders;
|
||||
if ([roles containsObject: SOGoRole_FolderCreator])
|
||||
rights |= RightsCreateSubfolders;
|
||||
|
||||
if (rights != 0)
|
||||
rights |= RoleNone; /* actually "folder visible" */
|
||||
|
|
Loading…
Reference in New Issue