From 640a42f2952b9d12aa953a82c3a15c44b8c26891 Mon Sep 17 00:00:00 2001 From: helge Date: Fri, 29 Oct 2004 15:57:10 +0000 Subject: [PATCH] fixed mail deletion git-svn-id: http://svn.opengroupware.org/SOGo/trunk@442 d1b88da0-ebda-0310-925b-ed51d893ca5b --- SOGo/UI/Mailer/ChangeLog | 4 ++++ SOGo/UI/Mailer/UIxMailEditor.m | 18 ++++++++++++++---- SOGo/UI/Mailer/Version | 2 +- 3 files changed, 19 insertions(+), 5 deletions(-) diff --git a/SOGo/UI/Mailer/ChangeLog b/SOGo/UI/Mailer/ChangeLog index 4ea1dc22..743d3e07 100644 --- a/SOGo/UI/Mailer/ChangeLog +++ b/SOGo/UI/Mailer/ChangeLog @@ -1,3 +1,7 @@ +2004-10-29 Helge Hess + + * UIxMailEditor.m: reenabled deletion of temporary mail files (v0.9.57) + 2004-10-28 Helge Hess * product.plist: fixed getMail for drafts folder (v0.9.56) diff --git a/SOGo/UI/Mailer/UIxMailEditor.m b/SOGo/UI/Mailer/UIxMailEditor.m index 6bae44aa..3de13625 100644 --- a/SOGo/UI/Mailer/UIxMailEditor.m +++ b/SOGo/UI/Mailer/UIxMailEditor.m @@ -48,6 +48,8 @@ @implementation UIxMailEditor +static BOOL keepMailTmpFile = NO; +static BOOL keepDraftAfterSend = NO; static NSArray *infoKeys = nil; + (void)initialize { @@ -55,6 +57,9 @@ static NSArray *infoKeys = nil; @"subject", @"text", @"to", @"cc", @"bcc", @"from", @"replyTo", nil]; + + if (keepMailTmpFile) + NSLog(@"WARNING: keeping mail files."); } - (void)dealloc { @@ -213,14 +218,19 @@ static NSArray *infoKeys = nil; /* finally store in Sent */ [self logWithFormat:@"TODO: store mail in Sent folder: %@", mailPath]; -#if 0 - [[NSFileManager defaultManager] removeFileAtPath:mailPath handler:nil]; -#endif + if (keepMailTmpFile) + [self logWithFormat:@"WARNING: keeping mail file: '%@'", mailPath]; + else + [[NSFileManager defaultManager] removeFileAtPath:mailPath handler:nil]; mailPath = nil; /* delete draft */ - if ((error = [[self clientObject] delete]) != nil) + if (keepDraftAfterSend) { + [self logWithFormat:@"WARNING: keeping draft object: '%@'", + [self clientObject]]; + } + else if ((error = [[self clientObject] delete]) != nil) return error; // if everything is ok, close the window (send a JS closing the Window) diff --git a/SOGo/UI/Mailer/Version b/SOGo/UI/Mailer/Version index 61d11427..120c434f 100644 --- a/SOGo/UI/Mailer/Version +++ b/SOGo/UI/Mailer/Version @@ -1,6 +1,6 @@ # $Id$ -SUBMINOR_VERSION:=56 +SUBMINOR_VERSION:=57 # v0.9.50 requires NGMime v4.3.190 # v0.9.43 requires NGObjWeb v4.3.73 -- 2.39.5