mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-06-27 21:04:18 +00:00
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:
@@ -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"];
|
||||
|
||||
Reference in New Issue
Block a user