mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
iImprove last change
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27224 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
26a651d0bd
commit
958ad09e77
3 changed files with 6 additions and 9 deletions
|
@ -1,8 +1,8 @@
|
|||
2008-12-06 Richard Frith-Macdonald <rfm@gnu.org>
|
||||
|
||||
* 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 <nicola.pero@meta-innovation.com>
|
||||
|
||||
|
|
|
@ -333,12 +333,12 @@ typedef enum _NSGNUstepStringEncoding
|
|||
@end
|
||||
|
||||
@implementation NSTask (GSCategories)
|
||||
/** Sets the launch path given the name of a tool.<br />
|
||||
/** Returns the launch path given the name of a tool.<br />
|
||||
* Locates the tool by looking in the standard directories,
|
||||
* and failing that in the PATH set in the environment.<br />
|
||||
* 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
|
||||
|
||||
/* ------------------------------------------------------------------------
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue