On 4 May 2006, at 09:44, David Ayers wrote:
I guess I was too terse but I would have assumed that:
[[NSBundle bundleForLibrary:@"gnustep-base"] executablePath]
would be what would give the expected result but indeed, this
returns:
/usr/GNUstep/System/Library/Libraries/Resources/gnustep-base/./gnu-
gnu-gnu/gnustep-base
for me in a flattended configuration.
Should this be considered a bug?
While Adam is the expert on NSBundle, I think this looks like a
bug ... probably on a few counts:
1. I guess in a 'flattened' configuration the 'gnu-gnu-gnu' should
not be in there
2. The actual path to the library itsself is not in the resources
subdirectory
3. I would expect the library name to be at the end of the path
Now, I hope that the oddities arise because this bundle is a
special case produced by a non-standard method (bundleForLibrary
which does not exist in OpenStep/MacOS-X). While special case code
could be considered a feature rather than a bug, I think it's
behavior should be consistent with that of other bundles! I would
have thought it should return the path of the library.