Adium

Changeset 25633

Show
Ignore:
Timestamp:
11/29/2008 10:47:47 AM (1 month ago)
Author:
evands
Message:

Added an AILog of an error if we fail to create a directory for writing out a log (rather than just ignoring any error entirely)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/Source/AIXMLAppender.m

    r25617 r25633  
    183183        } else { 
    184184                //Create each component of the path, then change into it. 
    185                 [manager createDirectoryAtPath:[appender.path stringByDeletingLastPathComponent] 
    186                    withIntermediateDirectories:YES 
    187                                                         attributes:[NSDictionary dictionaryWithObject:[NSNumber numberWithUnsignedLong:0700UL] forKey:NSFilePosixPermissions] 
    188                                                                  error:NULL]; 
    189                  
     185                NSError *error = nil; 
     186                if (![manager createDirectoryAtPath:[appender.path stringByDeletingLastPathComponent] 
     187                                withIntermediateDirectories:YES 
     188                                                                 attributes:[NSDictionary dictionaryWithObject:[NSNumber numberWithUnsignedLong:0700UL] forKey:NSFilePosixPermissions] 
     189                                                                          error:&error]) { 
     190                        AILogWithSignature(@"Error creating directory at %@: %@",  
     191                                                           [appender.path stringByDeletingLastPathComponent], 
     192                                                           error); 
     193                } 
     194 
    190195                appender.initialized = NO; 
    191196        }