mirror of
https://github.com/gnustep/libs-gsweb.git
synced 2025-04-23 15:33:43 +00:00
* GSWeb/GSWResourceManager.m
split names into pathExtension and name before feeding it into NSBundle. This is not needed on OSX, but on current -base git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/gsweb/trunk@30820 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
1150369626
commit
5ce84bfb63
2 changed files with 30 additions and 23 deletions
|
@ -1,3 +1,8 @@
|
|||
2010-06-22 David Wetzel <dave@turbocat.de>
|
||||
* GSWeb/GSWResourceManager.m
|
||||
split names into pathExtension and name before feeding it into NSBundle.
|
||||
This is not needed on OSX, but on current -base
|
||||
|
||||
2010-06-22 David Wetzel <dave@turbocat.de>
|
||||
* GSWeb/GSWResourceManager.h
|
||||
* GSWeb/GSWComponent.h
|
||||
|
|
|
@ -556,36 +556,38 @@ NSMutableDictionary *globalPathCache = nil;
|
|||
}
|
||||
|
||||
if (!bundleToUse) {
|
||||
// NSLog(@"%s: could not find bundle for resource '%@' inFramework '%@'",
|
||||
// __PRETTY_FUNCTION__, resourceName, frameworkName);
|
||||
return nil;
|
||||
}
|
||||
|
||||
path = [bundleToUse pathForResource:resourceName
|
||||
ofType:nil // if we have a full name we do not need this
|
||||
inDirectory:nil
|
||||
forLocalization:language];
|
||||
|
||||
if (!path) {
|
||||
path = [bundleToUse pathForResource:resourceName
|
||||
ofType:nil
|
||||
inDirectory:@"WebServer"
|
||||
// NSLog(@"%s: could not find bundle for resource '%@' inFramework '%@'",
|
||||
// __PRETTY_FUNCTION__, resourceName, frameworkName);
|
||||
} else {
|
||||
|
||||
NSString * nameWithoutExtension = [path stringByDeletingPathExtension];
|
||||
NSString * pathExtension = [path pathExtension];
|
||||
|
||||
path = [bundleToUse pathForResource:nameWithoutExtension
|
||||
ofType:pathExtension
|
||||
inDirectory:nil
|
||||
forLocalization:language];
|
||||
|
||||
if (!path) {
|
||||
path = [bundleToUse pathForResource:nameWithoutExtension
|
||||
ofType:pathExtension
|
||||
inDirectory:@"WebServer"
|
||||
forLocalization:language];
|
||||
}
|
||||
[self _cachePath:path
|
||||
forResourceNamed:resourceName
|
||||
inFramework:frameworkName
|
||||
language:language];
|
||||
}
|
||||
[self _cachePath:path
|
||||
forResourceNamed:resourceName
|
||||
inFramework:frameworkName
|
||||
language:language];
|
||||
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
END_SYNCHRONIZED;
|
||||
|
||||
/*
|
||||
NSLog(@"%s resourceName:'%@' language:'%@' frameworkName:'%@' path '%@'", __PRETTY_FUNCTION__,
|
||||
resourceName, language, frameworkName,
|
||||
path);
|
||||
NSLog(@"%s resourceName:'%@' language:'%@' frameworkName:'%@' path '%@'", __PRETTY_FUNCTION__,
|
||||
resourceName, language, frameworkName,
|
||||
path);
|
||||
*/
|
||||
if ([localNotFoundMarker isEqualToString:path]) {
|
||||
return nil;
|
||||
|
|
Loading…
Reference in a new issue