mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-05-21 11:25:24 +00:00
use fileAttributesAtPath
attributesOfItemAtPath is not available in older GNUstep releases. Broke build on squeeze and lucid.
This commit is contained in:
@@ -87,20 +87,19 @@ static void
|
||||
_injectConfigurationFromFile (NSUserDefaults *ud,
|
||||
NSString *filename, NSObject *logger)
|
||||
{
|
||||
NSDictionary *newConfig,*fileAttrs;
|
||||
NSError *fmError = nil;
|
||||
NSDictionary *newConfig, *fileAttrs;
|
||||
NSFileManager *fm;
|
||||
|
||||
fm = [NSFileManager defaultManager];
|
||||
if ([fm fileExistsAtPath: filename])
|
||||
{
|
||||
fileAttrs = [fm attributesOfItemAtPath: filename
|
||||
error: &fmError];
|
||||
fileAttrs = [fm fileAttributesAtPath: filename
|
||||
traverseLink: YES];
|
||||
if (![fileAttrs objectForKey: @"NSFileSize"])
|
||||
{
|
||||
[logger errorWithFormat:
|
||||
@"Can't get file attributes from '%@': %@",
|
||||
filename, [fmError description]];
|
||||
@"Can't get file attributes from '%@'",
|
||||
filename];
|
||||
exit(1);
|
||||
}
|
||||
if ([[fileAttrs objectForKey: @"NSFileSize"] intValue] == 0 )
|
||||
|
||||
Reference in New Issue
Block a user