mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-02-23 19:51:13 +00:00
added support for macOS X
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@19964 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f5270aed7d
commit
912b8cc6f5
1 changed files with 15 additions and 0 deletions
|
@ -424,6 +424,21 @@ RCS_ID("$Id$")
|
|||
fileManager=[NSFileManager defaultManager];
|
||||
exists=[fileManager fileExistsAtPath:completePathTest];
|
||||
NSDebugMLLog(@"bundles",@"exists=%s",(exists ? "YES" : "NO"));
|
||||
#ifdef __APPLE__
|
||||
if(!exists)
|
||||
{
|
||||
NSString *aCompletePath = [[[NSBundle bundleWithPath:bundlePath] pathForResource:[aName stringByDeletingPathExtension]
|
||||
ofType:[aName pathExtension]
|
||||
inDirectory:aDirectory forLocalization:aLanguage]
|
||||
stringByResolvingSymlinksInPath];
|
||||
|
||||
if([aCompletePath length] >= ([bundlePath length] + 1))
|
||||
{
|
||||
exists = YES;
|
||||
pathTest = [aCompletePath substringFromIndex:[bundlePath length] + 1];
|
||||
}
|
||||
}
|
||||
#endif //__APPLE__
|
||||
if (exists)
|
||||
{
|
||||
path=pathTest;
|
||||
|
|
Loading…
Reference in a new issue