mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-27 02:30:53 +00:00
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:
parent
78eb6f63a3
commit
1b50f24d06
1 changed files with 21 additions and 19 deletions
|
@ -1516,30 +1516,32 @@ newLockAt(Class self, SEL _cmd, id *location)
|
||||||
static NSString*
|
static NSString*
|
||||||
executablePath(NSFileManager *mgr, NSString *path)
|
executablePath(NSFileManager *mgr, NSString *path)
|
||||||
{
|
{
|
||||||
|
#if defined(__MINGW32__)
|
||||||
|
NSString *tmp;
|
||||||
|
|
||||||
if ([mgr isExecutableFileAtPath: path])
|
if ([mgr isExecutableFileAtPath: path])
|
||||||
{
|
{
|
||||||
return path;
|
return path;
|
||||||
}
|
}
|
||||||
#if defined(__MINGW32__)
|
tmp = [path stringByAppendingPathExtension: @"exe"];
|
||||||
if ([path pathExtension] == nil)
|
if ([mgr isExecutableFileAtPath: tmp])
|
||||||
{
|
{
|
||||||
NSString *tmp;
|
return tmp;
|
||||||
|
}
|
||||||
tmp = [path stringByAppendingPathExtension: @"exe"];
|
tmp = [path stringByAppendingPathExtension: @"com"];
|
||||||
if ([mgr isExecutableFileAtPath: tmp])
|
if ([mgr isExecutableFileAtPath: tmp])
|
||||||
{
|
{
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
tmp = [path stringByAppendingPathExtension: @"com"];
|
tmp = [path stringByAppendingPathExtension: @"cmd"];
|
||||||
if ([mgr isExecutableFileAtPath: tmp])
|
if ([mgr isExecutableFileAtPath: tmp])
|
||||||
{
|
{
|
||||||
return tmp;
|
return tmp;
|
||||||
}
|
}
|
||||||
tmp = [path stringByAppendingPathExtension: @"cmd"];
|
#else
|
||||||
if ([mgr isExecutableFileAtPath: tmp])
|
if ([mgr isExecutableFileAtPath: path])
|
||||||
{
|
{
|
||||||
return tmp;
|
return path;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return nil;
|
return nil;
|
||||||
|
|
Loading…
Reference in a new issue