bug-gnustep
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSBundle -initWithPath: warning


From: Richard Frith-Macdonald
Subject: Re: NSBundle -initWithPath: warning
Date: Sat, 02 Apr 2005 05:24:53 +0100

On 2005-04-02 04:37:19 +0100 Sheldon Gill <sheldon@westnet.net.au> wrote:

I've looked over this some more and on this point I still think there is a case. The Foundation docs say it needs a "full path", not "thou shalt specify an absolute path".

Yes, the term 'full path' is not completely clear/well-defined. However, it's hard to see exactly what it could mean if it's not a synonym for 'absolute path'. I guess it could just mean 'path', or perhaps it could mean 'path without tilde escapes'.

It also says that any symlinks must be resolvable.

I read it as saying 'use a full path otherwise this may not be able to find your bundle and will return nil'.

I believe we comply with the letter of the docs and maintain compatibility without the check.

Still, it'd be interesting to test behaviour on MacOS.

I did that ... on an up to date version of MacOS-X, the behavior is that it allows you to supply a relative path, but when I did so, then changed the current working directory so that the path was no longer valid, then tried to use the bundle, I got a crash with a segementation violation.

My guess is that the Apple code just doesn't work reliably with relative paths, so they made the documentation tell you not to use them, rather than fixing the source.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]