diff --git a/ChangeLog b/ChangeLog index 516ca887d..74cd5f1ee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2005-04-01 Richard Frith-Macdonald + + * Source/NSBundle.m: Minor debug/warning log tweaks. + * Headers/Foundation/NSBundle.h: Document differences between GNUstep + and MacOS-X when initialising using a relative path. + * Headers/NSString.h: Fix typo in comment. + 2005-03-31 Adam Fedor * ANNOUNCE, NEWS, Documentation/news.texi, diff --git a/Headers/Foundation/NSBundle.h b/Headers/Foundation/NSBundle.h index 7b55ea677..9324a3714 100644 --- a/Headers/Foundation/NSBundle.h +++ b/Headers/Foundation/NSBundle.h @@ -171,11 +171,21 @@ GS_EXPORT NSString* const NSLoadedClasses; withVersion: (int)version; /** - * Init the bundle for reading resources from path. path must be an - * absolute path to a directory on disk. If path is nil or doesn't - * exist, initWithPath: returns nil. If a bundle for that path - * already existed, it is returned in place of the receiver (and the - * receiver is deallocated). + * Init the bundle for reading resources from path.
+ * The MacOS-X documentation says that the path must be a full path to + * a directory on disk. However, it (in MacOS-X) version 10.3 at least) + * actually accepts relative paths too.
+ * The GNUstep behavior is similar in that it accepts a relative path, + * but GNUstep converts it to an absolute path by referring to the + * current working directory when the is initialised, so an absolute + * path is then used and a warning message is printed.
+ * On MacOS-X using a bundle initialised with a relative path will cause + * a crash if the current working directory is changed between the point + * at which the bundle was initialised and that at which it is used.
+ * If path is nil or can't be accessed, initWithPath: reallocates the + * receiver and returns nil.
+ * If a bundle for that path already existed, it is returned in place + * of the receiver (and the receiver is deallocated). */ - (id) initWithPath: (NSString*)path; diff --git a/Headers/Foundation/NSString.h b/Headers/Foundation/NSString.h index 8017d86ce..751a9248a 100644 --- a/Headers/Foundation/NSString.h +++ b/Headers/Foundation/NSString.h @@ -461,7 +461,7 @@ enum { * @"//host/share/file" produces @"//host/share/" * @"//host/share/" produces @"/host/share/" * @"//host/share" produces @"/host/share" - * + * */ - (NSString*) stringByDeletingLastPathComponent; diff --git a/Source/NSBundle.m b/Source/NSBundle.m index b068507eb..bdab88987 100644 --- a/Source/NSBundle.m +++ b/Source/NSBundle.m @@ -895,13 +895,13 @@ _bundle_load_callback(Class theClass, struct objc_category *theCategory) if (!path || [path length] == 0) { - NSLog(@"No path specified for bundle"); + NSDebugMLog(@"No path specified for bundle"); [self dealloc]; return nil; } if ([path isAbsolutePath] == NO) { - NSLog(@"WARNING: NSBundle -initWithPath: requires absolute path names!"); + NSWarnMLog(@"NSBundle -initWithPath: requires absolute path names!"); path = [[[NSFileManager defaultManager] currentDirectoryPath] stringByAppendingPathComponent: path]; }