Tiny tidyup

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/branches/path-handling@21219 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-Macdonald 2005-05-12 16:31:28 +00:00
parent 1661351869
commit 2983bafa33
2 changed files with 9 additions and 1 deletions

View file

@ -185,7 +185,9 @@ enum {
* The mode selected if you provide any other argument to this
* method is the default <em>gnustep</em> mode, in which the system tries
* to <em>do-the-right-thing</em> and support both windows and unix style
* paths at the same time.
* paths at the same time.<br />
* This method provided for experimental purposes only. The separate unix
* and windows modes may be dropped in future.
*/
+ (void) setPathHandling: (NSString*)mode;
#endif
@ -454,6 +456,7 @@ enum {
* @"/" with @"app" produces @"/" (no file name to append to)
* @"" with @"app" produces @"" (no file name to append to)
* </example>
* For MacOS-X compatibility, this method raises an exception if aString is nil.
*/
- (NSString*) stringByAppendingPathExtension: (NSString*)aString;

View file

@ -3637,6 +3637,11 @@ static NSFileManager *fm = nil;
unsigned originalLength = l;
unsigned root;
if (aString == nil)
{
[NSException raise: NSInvalidArgumentException
format: @"nil value supplied as path extension"];
}
if (l == 0)
{
NSLog(@"[%@-%@] cannot append extension '%@' to empty string",