mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-26 18:21:04 +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*
|
||||
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;
|
||||
|
|
Loading…
Reference in a new issue