Changeset 668

Show
Ignore:
Timestamp:
09/21/08 21:25:19 (4 months ago)
Author:
gbooker
Message:

Make sure / directory exists with the proper settings (does not trash the user's settings)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/CoreData/SapphireFrappliance/FRAppliance/SapphireApplianceController.m

    r649 r668  
    4646#import "SapphireMovieDirectory.h" 
    4747 
     48#import "NSFileManager-Extensions.h" 
     49 
    4850NSString *SAPPHIRE_MANAGED_OBJECT_CONTEXT_CLOSING =     @"SapphireManagedObjectContextClosing"; 
    4951 
     
    252254        [theme setScene:[self scene]]; 
    253255         
     256        NSFileManager *fm = [NSFileManager defaultManager]; 
    254257        NSString *storeFile = [NSHomeDirectory() stringByAppendingPathComponent:@"Library/Application Support/Sapphire/metaData.sapphireData"]; 
     258        [fm constructPath:[storeFile stringByDeletingLastPathComponent]]; 
    255259        moc = [[NSManagedObjectContext alloc] init]; 
    256260        [moc setUndoManager:nil]; 
     
    267271        [coord addPersistentStoreWithType:NSSQLiteStoreType configuration:nil URL:storeUrl options:nil error:&error]; 
    268272        [SapphireDirectoryMetaData createDirectoryWithPath:@"/" parent:nil inContext:moc]; 
     273        [SapphireCollectionDirectory collectionAtPath:@"/" mount:YES skip:YES hidden:YES manual:NO inContext:moc]; 
    269274         
    270275        settings                                                                = [[SapphireSettings alloc] initWithScene:[self scene] settingsPath:[NSHomeDirectory() stringByAppendingPathComponent:@"Library/Application Support/Sapphire/settings.plist"] context:moc];