mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-16 02:40:53 +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/NSPortNameServer.h"
|
||||||
#import "Foundation/NSDebug.h"
|
#import "Foundation/NSDebug.h"
|
||||||
#import "Foundation/NSThread.h"
|
#import "Foundation/NSThread.h"
|
||||||
|
#import "GNUstepBase/GSCategories.h"
|
||||||
#import "../Tools/gdnc.h"
|
#import "../Tools/gdnc.h"
|
||||||
|
|
||||||
|
|
||||||
|
@ -695,22 +696,8 @@ static NSDistributedNotificationCenter *netCenter = nil;
|
||||||
NSString *cmd = nil;
|
NSString *cmd = nil;
|
||||||
NSArray *args = nil;
|
NSArray *args = nil;
|
||||||
NSDate *limit;
|
NSDate *limit;
|
||||||
NSEnumerator *enumerator;
|
|
||||||
NSString *path;
|
|
||||||
NSFileManager *mgr;
|
|
||||||
|
|
||||||
mgr = [NSFileManager defaultManager];
|
cmd = [NSTask launchPathForTool: @"gdnc"];
|
||||||
enumerator = [NSSearchPathForDirectoriesInDomains(
|
|
||||||
GSToolsDirectory, NSAllDomainsMask, YES) objectEnumerator];
|
|
||||||
while ((path = [enumerator nextObject]) != nil)
|
|
||||||
{
|
|
||||||
path = [path stringByAppendingPathComponent: @"gdnc"];
|
|
||||||
if ([mgr isExecutableFileAtPath: path])
|
|
||||||
{
|
|
||||||
cmd = path;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
NSDebugMLLog(@"NSDistributedNotificationCenter",
|
NSDebugMLLog(@"NSDistributedNotificationCenter",
|
||||||
@"\nI couldn't contact the notification server for %@ -\n"
|
@"\nI couldn't contact the notification server for %@ -\n"
|
||||||
|
|
|
@ -46,6 +46,7 @@
|
||||||
#import "Foundation/NSPathUtilities.h"
|
#import "Foundation/NSPathUtilities.h"
|
||||||
#import "Foundation/NSPortNameServer.h"
|
#import "Foundation/NSPortNameServer.h"
|
||||||
#import "Foundation/NSDebug.h"
|
#import "Foundation/NSDebug.h"
|
||||||
|
#import "GNUstepBase/GSCategories.h"
|
||||||
|
|
||||||
#import "GSPortPrivate.h"
|
#import "GSPortPrivate.h"
|
||||||
|
|
||||||
|
@ -187,22 +188,7 @@ typedef enum {
|
||||||
[self close];
|
[self close];
|
||||||
if (launchCmd == nil)
|
if (launchCmd == nil)
|
||||||
{
|
{
|
||||||
NSEnumerator *enumerator;
|
launchCmd = [NSTask launchPathForTool: @"gdomap"];
|
||||||
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;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (state == GSPC_LOPEN && launchCmd != nil)
|
if (state == GSPC_LOPEN && launchCmd != nil)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue