remove unnecessary check

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@27237 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2008-12-07 05:36:37 +00:00
parent ab86d60de4
commit 2d69af5819

View file

@ -1516,30 +1516,32 @@ newLockAt(Class self, SEL _cmd, id *location)
static NSString*
executablePath(NSFileManager *mgr, NSString *path)
{
#if defined(__MINGW32__)
NSString *tmp;
if ([mgr isExecutableFileAtPath: path])
{
return path;
}
#if defined(__MINGW32__)
if ([path pathExtension] == nil)
tmp = [path stringByAppendingPathExtension: @"exe"];
if ([mgr isExecutableFileAtPath: tmp])
{
NSString *tmp;
tmp = [path stringByAppendingPathExtension: @"exe"];
if ([mgr isExecutableFileAtPath: tmp])
{
return tmp;
}
tmp = [path stringByAppendingPathExtension: @"com"];
if ([mgr isExecutableFileAtPath: tmp])
{
return tmp;
}
tmp = [path stringByAppendingPathExtension: @"cmd"];
if ([mgr isExecutableFileAtPath: tmp])
{
return tmp;
}
return tmp;
}
tmp = [path stringByAppendingPathExtension: @"com"];
if ([mgr isExecutableFileAtPath: tmp])
{
return tmp;
}
tmp = [path stringByAppendingPathExtension: @"cmd"];
if ([mgr isExecutableFileAtPath: tmp])
{
return tmp;
}
#else
if ([mgr isExecutableFileAtPath: path])
{
return path;
}
#endif
return nil;