See ChangeLog

Monotone-Parent: 4753dc596b8d9070a66d1d6b4dbe88e746c19a81
Monotone-Revision: 398e2de6f331504256a7ec906263ca190e2008af

Monotone-Author: crobert@inverse.ca
Monotone-Date: 2008-10-02T15:00:13
Monotone-Branch: ca.inverse.sogo
This commit is contained in:
C Robert
2008-10-02 15:00:13 +00:00
parent 486a2ee846
commit ffbbc25ded
158 changed files with 296 additions and 103 deletions
+7 -3
View File
@@ -322,7 +322,7 @@ static NSString *spoolFolder = nil;
{
NSException *error;
NSFileManager *fm;
NSString *spoolPath, *fileName;
NSString *spoolPath, *fileName, *zipPath;
NSDictionary *msgs;
NSArray *messages;
NSData *content, *zipContent;
@@ -337,9 +337,13 @@ static NSString *spoolFolder = nil;
reason: @"spoolFolderPath doesn't exist"];
return (WOResponse *)error;
}
zipPath = [[NSUserDefaults standardUserDefaults] stringForKey: @"SOGoZipPath"];
if (![zipPath length])
zipPath = [NSString stringWithString: @"/usr/bin/zip"];
fm = [NSFileManager defaultManager];
if ( ![fm fileExistsAtPath: @"/usr/bin/zip"] ) {
if ( ![fm fileExistsAtPath: zipPath] ) {
error = [NSException exceptionWithHTTPStatus: 500
reason: @"zip not available"];
return (WOResponse *)error;
@@ -347,7 +351,7 @@ static NSString *spoolFolder = nil;
zipTask = [[NSTask alloc] init];
[zipTask setCurrentDirectoryPath: spoolPath];
[zipTask setLaunchPath: @"/usr/bin/zip"];
[zipTask setLaunchPath: zipPath];
zipTaskArguments = [NSMutableArray arrayWithObjects: nil];
[zipTaskArguments addObject: @"SavedMessages.zip"];