fix create folder that already exist

This commit is contained in:
Hivert Quentin
2025-11-27 16:14:47 +01:00
parent 78c6aa5236
commit 7513f76be7
2 changed files with 9 additions and 3 deletions

View File

@@ -370,7 +370,9 @@ void handle_eas_terminate(int signum)
NSMutableString *s;
NSData *d;
int type;
int type, status;
status = 1;
parentId = [[(id)[theDocumentElement getElementsByTagName: @"ParentId"] lastObject] textValue];
displayName = [[(id)[theDocumentElement getElementsByTagName: @"DisplayName"] lastObject] textValue];
@@ -413,6 +415,11 @@ void handle_eas_terminate(int signum)
// FIXME
// handle exists (status == 2)
// handle right synckey
if([newFolder exists])
{
nameInContainer = [newFolder nameInContainer];
status = 2;
}
if ([newFolder create])
{
SOGoMailAccount *accountFolder;
@@ -528,7 +535,7 @@ void handle_eas_terminate(int signum)
[s appendString: @"<?xml version=\"1.0\" encoding=\"utf-8\"?>"];
[s appendString: @"<!DOCTYPE ActiveSync PUBLIC \"-//MICROSOFT//DTD ActiveSync//EN\" \"http://www.microsoft.com/\">"];
[s appendString: @"<FolderCreate xmlns=\"FolderHierarchy:\">"];
[s appendFormat: @"<Status>%d</Status>", 1];
[s appendFormat: @"<Status>%d</Status>", status];
[s appendFormat: @"<SyncKey>%@</SyncKey>", syncKey];
[s appendFormat: @"<ServerId>%@</ServerId>", [nameInContainer stringByEscapingURL]];
[s appendString: @"</FolderCreate>"];

View File

@@ -60,7 +60,6 @@
perr = PolicyNoError;
trueLogin = [_login stringByReplacingString: @"%40"
withString: @"@"];
NSLog(@"login: %@ truelogin %@ pwd %@", _login, trueLogin, _pwd);
rc = ([[SOGoUserManager sharedUserManager]
checkLogin: trueLogin
password: _pwd