Changeset 71

Show
Ignore:
Timestamp:
03/17/03 19:37:09 (5 years ago)
Author:
nonex
Message:

Make sure to access with the full path.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/MVPreferencesController.m

    r68 r71  
    3434- (id) init { 
    3535        if( ( self = [super init] ) ) { 
    36                 NSDirectoryEnumerator *enumerator = [[NSFileManager defaultManager] enumeratorAtPath:[NSString stringWithFormat:@"%@/Contents/PreferencePanes", [[NSBundle mainBundle] bundlePath]]]; 
     36                NSString *path = [NSString stringWithFormat:@"%@/Contents/PreferencePanes", [[NSBundle mainBundle] bundlePath]]; 
     37                NSDirectoryEnumerator *enumerator = [[NSFileManager defaultManager] enumeratorAtPath:path]; 
    3738                NSString *file = nil; 
    3839                NSBundle *bundle = nil; 
     
    4445                while( ( file = [enumerator nextObject] ) ) { 
    4546                        if( [[file pathExtension] isEqualToString:@"prefPane"] ) { 
    46                                 bundle = [NSBundle bundleWithPath:file]; 
     47                                bundle = [NSBundle bundleWithPath:[NSString stringWithFormat:@"%@/%@", path, file]]; 
    4748                                if( [bundle load] ) [panes addObject:bundle]; 
    4849                        }