See ChangeLog
Monotone-Parent: b650569887c118b01da27c8339a401335419846c Monotone-Revision: cf83f210bd51772341ff7ea082a7e6bd95fc4bea Monotone-Author: ludovic@Sophos.ca Monotone-Date: 2009-03-04T14:41:00 Monotone-Branch: ca.inverse.sogomaint-2.0.2
parent
997299688d
commit
2388f30093
|
@ -1,3 +1,9 @@
|
|||
2009-03-04 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* Fixed a small issue when fetching parts where
|
||||
the encoding could be nil and subsequently, the
|
||||
path couldn't be set.
|
||||
|
||||
2009-03-03 Ludovic Marcotte <lmarcotte@inverse.ca>
|
||||
|
||||
* Fixed various small issues with the SOGo
|
||||
|
|
|
@ -243,9 +243,8 @@
|
|||
currentFile = [NSDictionary dictionaryWithObjectsAndKeys:
|
||||
filename, @"filename",
|
||||
[mimeType lowercaseString], @"mimetype",
|
||||
[part
|
||||
objectForKey: @"encoding"], @"encoding",
|
||||
path, @"path", nil];
|
||||
path, @"path",
|
||||
[part objectForKey: @"encoding"], @"encoding", nil];
|
||||
[keys addObject: currentFile];
|
||||
}
|
||||
}
|
||||
|
@ -254,29 +253,26 @@
|
|||
intoArray: (NSMutableArray *) keys
|
||||
withPath: (NSString *) path
|
||||
{
|
||||
NSEnumerator *subparts;
|
||||
NSString *type;
|
||||
unsigned int count;
|
||||
NSDictionary *currentPart;
|
||||
NSMutableDictionary *currentPart;
|
||||
NSString *newPath;
|
||||
NSArray *subparts;
|
||||
NSString *type;
|
||||
unsigned int i;
|
||||
|
||||
type = [[part objectForKey: @"type"] lowercaseString];
|
||||
if ([type isEqualToString: @"multipart"])
|
||||
{
|
||||
subparts = [[part objectForKey: @"parts"] objectEnumerator];
|
||||
currentPart = [subparts nextObject];
|
||||
count = 1;
|
||||
while (currentPart)
|
||||
subparts = [part objectForKey: @"parts"];
|
||||
for (i = 1; i <= [subparts count]; i++)
|
||||
{
|
||||
currentPart = [subparts objectAtIndex: i-1];
|
||||
if (path)
|
||||
newPath = [NSString stringWithFormat: @"%@.%d", path, count];
|
||||
newPath = [NSString stringWithFormat: @"%@.%d", path, i];
|
||||
else
|
||||
newPath = [NSString stringWithFormat: @"%d", count];
|
||||
newPath = [NSString stringWithFormat: @"%d", i];
|
||||
[self _fetchFileAttachmentKeysInPart: currentPart
|
||||
intoArray: keys
|
||||
withPath: newPath];
|
||||
currentPart = [subparts nextObject];
|
||||
count++;
|
||||
}
|
||||
}
|
||||
else
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/* NSArray+Utilities.m - this file is part of SOGo
|
||||
*
|
||||
* Copyright (C) 2006 Inverse inc.
|
||||
* Copyright (C) 2006-2009 Inverse inc.
|
||||
*
|
||||
* Author: Wolfgang Sourdeau <wsourdeau@inverse.ca>
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue