mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-15 18:33:57 +00:00
Use new helper method.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27235 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
b694892d87
commit
ab86d60de4
2 changed files with 4 additions and 31 deletions
|
@ -44,6 +44,7 @@
|
|||
#import "Foundation/NSPortNameServer.h"
|
||||
#import "Foundation/NSDebug.h"
|
||||
#import "Foundation/NSThread.h"
|
||||
#import "GNUstepBase/GSCategories.h"
|
||||
#import "../Tools/gdnc.h"
|
||||
|
||||
|
||||
|
@ -695,22 +696,8 @@ static NSDistributedNotificationCenter *netCenter = nil;
|
|||
NSString *cmd = nil;
|
||||
NSArray *args = nil;
|
||||
NSDate *limit;
|
||||
NSEnumerator *enumerator;
|
||||
NSString *path;
|
||||
NSFileManager *mgr;
|
||||
|
||||
mgr = [NSFileManager defaultManager];
|
||||
enumerator = [NSSearchPathForDirectoriesInDomains(
|
||||
GSToolsDirectory, NSAllDomainsMask, YES) objectEnumerator];
|
||||
while ((path = [enumerator nextObject]) != nil)
|
||||
{
|
||||
path = [path stringByAppendingPathComponent: @"gdnc"];
|
||||
if ([mgr isExecutableFileAtPath: path])
|
||||
{
|
||||
cmd = path;
|
||||
break;
|
||||
}
|
||||
}
|
||||
cmd = [NSTask launchPathForTool: @"gdnc"];
|
||||
|
||||
NSDebugMLLog(@"NSDistributedNotificationCenter",
|
||||
@"\nI couldn't contact the notification server for %@ -\n"
|
||||
|
|
|
@ -46,6 +46,7 @@
|
|||
#import "Foundation/NSPathUtilities.h"
|
||||
#import "Foundation/NSPortNameServer.h"
|
||||
#import "Foundation/NSDebug.h"
|
||||
#import "GNUstepBase/GSCategories.h"
|
||||
|
||||
#import "GSPortPrivate.h"
|
||||
|
||||
|
@ -187,22 +188,7 @@ typedef enum {
|
|||
[self close];
|
||||
if (launchCmd == nil)
|
||||
{
|
||||
NSEnumerator *enumerator;
|
||||
NSString *path;
|
||||
NSFileManager *mgr;
|
||||
|
||||
mgr = [NSFileManager defaultManager];
|
||||
enumerator = [NSSearchPathForDirectoriesInDomains(
|
||||
GSToolsDirectory, NSAllDomainsMask, YES) objectEnumerator];
|
||||
while ((path = [enumerator nextObject]) != nil)
|
||||
{
|
||||
path = [path stringByAppendingPathComponent: @"gdomap"];
|
||||
if ([mgr isExecutableFileAtPath: path])
|
||||
{
|
||||
launchCmd = [path copy];
|
||||
break;
|
||||
}
|
||||
}
|
||||
launchCmd = [NSTask launchPathForTool: @"gdomap"];
|
||||
}
|
||||
if (state == GSPC_LOPEN && launchCmd != nil)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue