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; } }