From 958ad09e77b18f2f2889e05c274a9bc15595be47 Mon Sep 17 00:00:00 2001 From: rfm Date: Sat, 6 Dec 2008 15:27:49 +0000 Subject: [PATCH] iImprove last change git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27224 72102866-910b-0410-8b05-ffd578937521 --- ChangeLog | 4 ++-- Headers/Additions/GNUstepBase/GSCategories.h | 6 +++--- Source/Additions/GSCategories.m | 5 +---- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/ChangeLog b/ChangeLog index fcdcb7bc7..b32775f6d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,8 +1,8 @@ 2008-12-06 Richard Frith-Macdonald - * Source/Additions/GSCategories.m: ([setLaunchPathForTool:]) + * Source/Additions/GSCategories.m: ([+launchPathForTool:]) Convenience method to locate a tool in the standard locations or in the - PATH and set it as the launch path of a task. + PATH so that it can be used as the launch path of a task. 2008-12-05 Nicola Pero diff --git a/Headers/Additions/GNUstepBase/GSCategories.h b/Headers/Additions/GNUstepBase/GSCategories.h index bddaed425..37bebb776 100644 --- a/Headers/Additions/GNUstepBase/GSCategories.h +++ b/Headers/Additions/GNUstepBase/GSCategories.h @@ -333,12 +333,12 @@ typedef enum _NSGNUstepStringEncoding @end @implementation NSTask (GSCategories) -/** Sets the launch path given the name of a tool.
+/** Returns the launch path given the name of a tool.
* Locates the tool by looking in the standard directories, * and failing that in the PATH set in the environment.
- * Returns the path set, or nil if the tool could not be located. + * Returns the path found, or nil if the tool could not be located. */ -- (NSString*) setLaunchPathForTool: (NSString*)name; ++ (NSString*) launchPathForTool: (NSString*)name; @end /* ------------------------------------------------------------------------ diff --git a/Source/Additions/GSCategories.m b/Source/Additions/GSCategories.m index e52ae7f35..ac3e19e3a 100644 --- a/Source/Additions/GSCategories.m +++ b/Source/Additions/GSCategories.m @@ -1545,7 +1545,7 @@ executablePath(NSFileManager *mgr, NSString *path) return nil; } -- (NSString*) setLaunchPathForTool: (NSString*)name ++ (NSString*) launchPathForTool: (NSString*)name { NSEnumerator *enumerator; NSDictionary *env; @@ -1563,7 +1563,6 @@ executablePath(NSFileManager *mgr, NSString *path) path = [path stringByAppendingPathComponent: name]; if ((path = executablePath(mgr, path)) != nil) { - [self setLaunchPath: path]; return path; } } @@ -1574,7 +1573,6 @@ executablePath(NSFileManager *mgr, NSString *path) path = [path stringByAppendingPathComponent: name]; if ((path = executablePath(mgr, path)) != nil) { - [self setLaunchPath: path]; return path; } } @@ -1597,7 +1595,6 @@ executablePath(NSFileManager *mgr, NSString *path) path = [path stringByAppendingPathComponent: name]; if ((path = executablePath(mgr, path)) != nil) { - [self setLaunchPath: path]; return path; } }