diff --git a/ChangeLog b/ChangeLog index d9f8e9b0..bb483213 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2005-11-13 Richard Frith-Macdonald + + * GormCore/GormFunctions.m: Use NSSearchPathForDirectoriesInDomains() + to locate resources rather than broken use of NSOpenStepRootDirectory() + 2005-11-12 16:32 Gregory John Casamento * GormCore/GormClassManager.m diff --git a/GormCore/GormFunctions.m b/GormCore/GormFunctions.m index 3c454297..c2a1e171 100644 --- a/GormCore/GormFunctions.m +++ b/GormCore/GormFunctions.m @@ -225,8 +225,8 @@ NSDictionary *colorToDict(NSColor *color) NSArray *systemImagesList() { - NSString *system = [NSOpenStepRootDirectory() stringByAppendingPathComponent: @"System"]; - NSString *lib = [system stringByAppendingPathComponent: @"Library"]; + NSString *lib = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSSystemDomainMask) lastObject]; + NSString *path = [lib stringByAppendingPathComponent: @"Images"]; NSArray *contents = [[NSFileManager defaultManager] directoryContentsAtPath: path]; NSEnumerator *en = [contents objectEnumerator]; @@ -248,8 +248,7 @@ NSArray *systemImagesList() NSArray *systemSoundsList() { - NSString *system = [NSOpenStepRootDirectory() stringByAppendingPathComponent: @"System"]; - NSString *lib = [system stringByAppendingPathComponent: @"Library"]; + NSString *lib = [NSSearchPathForDirectoriesInDomains(NSLibraryDirectory, NSSystemDomainMask) lastObject]; NSString *path = [lib stringByAppendingPathComponent: @"Sounds"]; NSArray *contents = [[NSFileManager defaultManager] directoryContentsAtPath: path]; NSEnumerator *en = [contents objectEnumerator];