mirror of
https://github.com/gnustep/libs-gui.git
synced 2025-04-22 17:52:42 +00:00
-loadIMFile automatically searches in
GNUSTEP_SYSTEM_ROOT/Library/Model/ for gmodels git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gui/trunk@3257 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
8c8b46ac00
commit
c765437cfb
1 changed files with 12 additions and 3 deletions
|
@ -84,9 +84,18 @@ BOOL _fileOwnerDecoded = NO;
|
|||
}
|
||||
else {
|
||||
/* The path is a relative path; search it in the current bundle. */
|
||||
path = [resourcePath stringByAppendingPathComponent:path];
|
||||
if (![[NSFileManager defaultManager] fileExistsAtPath:path])
|
||||
return NO;
|
||||
//path = [resourcePath stringByAppendingPathComponent:path];
|
||||
if (![[NSFileManager defaultManager] fileExistsAtPath:
|
||||
[resourcePath stringByAppendingPathComponent:path]]) {
|
||||
//try in GNUSTEP_ROOT/Library/Model/...
|
||||
NSString *root;
|
||||
|
||||
root = [NSString stringWithCString:getenv("GNUSTEP_SYSTEM_ROOT")];
|
||||
root = [root stringByAppendingPathComponent:@"Library/Model/"];
|
||||
path = [root stringByAppendingPathComponent:path];
|
||||
if (![[NSFileManager defaultManager] fileExistsAtPath:path])
|
||||
return NO;
|
||||
}
|
||||
}
|
||||
|
||||
NSLog (@"loading model file %@...", path);
|
||||
|
|
Loading…
Reference in a new issue