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:
Richard Frith-MacDonald 2008-12-06 23:08:37 +00:00
parent b694892d87
commit ab86d60de4
2 changed files with 4 additions and 31 deletions

View file

@ -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"