Skip to content

Commit

Permalink
Fixed searching of the database file
Browse files Browse the repository at this point in the history
  • Loading branch information
Moritz Ulrich committed Jul 6, 2009
1 parent e2d90fc commit dee23e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions ThingsPlugin.m
Expand Up @@ -60,11 +60,12 @@ - (id)init {
preferences = [[NSMutableDictionary alloc] initWithContentsOfFile:preferencesPath];

queryLimit = [[preferences valueForKey:@"Limit"] intValue];

NSFileManager* fm = [NSFileManager defaultManager];

NSString* databasePath = [preferences objectForKey:@"databasePath"];
if(databasePath == nil || [databasePath length] == 0) {
if(databasePath == nil || [fm fileExistsAtPath:[preferences objectForKey:@"databasePath"]]) {
NSLog(@"We do not have the database path, going to search for it.");
NSFileManager* fm = [NSFileManager defaultManager];

NSString* appPath = @"/User/Applications/";
NSArray* uuidDirs = [fm directoryContentsAtPath:appPath];
Expand Down

0 comments on commit dee23e7

Please sign in to comment.