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:
rfm 2008-12-07 05:36:37 +00:00
parent 78eb6f63a3
commit 1b50f24d06

View file

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