If there was no change in the directory don't even attempt to check files.

This commit is contained in:
Mitchell Livingston 2006-07-07 21:58:17 +00:00
parent a2962c4a71
commit b252a98c13
1 changed files with 20 additions and 19 deletions

View File

@ -1148,11 +1148,12 @@ static void sleepCallBack(void * controller, io_service_t y,
NSString * path = [[fDefaults stringForKey: @"AutoImportDirectory"] stringByExpandingTildeInPath];
//if folder cannot be found simply give up
NSArray * allFileNames;
if (!(allFileNames = [[NSFileManager defaultManager] directoryContentsAtPath: path]))
//if folder cannot be found or the contents hasn't changed simply give up
NSArray * allFileNames;NSLog(@"first");
if (!(allFileNames = [[NSFileManager defaultManager] directoryContentsAtPath: path])
|| [allFileNames isEqualToArray: fAutoImportedNames])
return;
NSLog(@"here!");
//try to add files that haven't already been added
NSMutableArray * newFileNames = [NSMutableArray arrayWithArray: allFileNames];
[newFileNames removeObjectsInArray: fAutoImportedNames];
@ -1721,7 +1722,7 @@ static void sleepCallBack(void * controller, io_service_t y,
}
}
- (NSRect) windowWillUseStandardFrame: (NSWindow *) w defaultFrame: (NSRect) defaultFrame
- (NSRect) windowWillUseStandardFrame: (NSWindow *) window defaultFrame: (NSRect) defaultFrame
{
NSRect windowRect = [fWindow frame];
float newHeight = windowRect.size.height - [fScrollView frame].size.height