Show
Ignore:
Timestamp:
07/05/10 17:33:37 (23 months ago)
Author:
gbooker
Message:

When upgrading, ignore parent.path and instead recompute it since previous database may be incorrect.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/SapphireFrappliance/MetaData/SapphireMObjects/SapphireDirectoryMetaData.m

    r1251 r1299  
    7373        { 
    7474                NSString *path = [oldDir valueForKey:@"path"]; 
    75                 NSString *parentPath = [oldDir valueForKeyPath:@"parent.path"]; 
    76                 if(parentPath != nil) 
     75                NSString *parentPath = [path stringByDeletingLastPathComponent]; 
     76                if(parentPath != nil && ![parentPath isEqualToString:@"/"]) 
    7777                        ((SapphireDirectoryMetaData *)[lookup objectForKey:path]).parent = [lookup objectForKey:parentPath]; 
    7878        }