+2004-10-29 Helge Hess <helge.hess@skyrix.com>
+
+ * UIxMailEditor.m: reenabled deletion of temporary mail files (v0.9.57)
+
2004-10-28 Helge Hess <helge.hess@skyrix.com>
* product.plist: fixed getMail for drafts folder (v0.9.56)
@implementation UIxMailEditor
+static BOOL keepMailTmpFile = NO;
+static BOOL keepDraftAfterSend = NO;
static NSArray *infoKeys = nil;
+ (void)initialize {
@"subject", @"text", @"to", @"cc", @"bcc",
@"from", @"replyTo",
nil];
+
+ if (keepMailTmpFile)
+ NSLog(@"WARNING: keeping mail files.");
}
- (void)dealloc {
/* 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)