mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 16:30:41 +00:00
Minor win32 fix
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@8468 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
545718f0a4
commit
5c8b61a934
3 changed files with 25 additions and 16 deletions
|
@ -1331,19 +1331,23 @@ _bundle_load_callback(Class theClass, Category *theCategory)
|
|||
if ([mgr isExecutableFileAtPath: prefix])
|
||||
return [prefix stringByStandardizingPath];
|
||||
#if defined(__WIN32__)
|
||||
/* Also add common executable extensions on windows */
|
||||
if ([path pathExtension] == nil)
|
||||
{
|
||||
NSString *wpath;
|
||||
wpath = [prefix stringByAppendingPathExtension: @"exe"];
|
||||
if ([mgr isExecutableFileAtPath: wpath])
|
||||
return [wpath stringByStandardizingPath];
|
||||
wpath = [prefix stringByAppendingPathExtension: @"com"];
|
||||
if ([mgr isExecutableFileAtPath: wpath])
|
||||
return [wpath stringByStandardizingPath];
|
||||
wpath = [prefix stringByAppendingPathExtension: @"cmd"];
|
||||
if ([mgr isExecutableFileAtPath: wpath])
|
||||
return [wpath stringByStandardizingPath];
|
||||
{
|
||||
NSString *ext = [path pathExtension];
|
||||
|
||||
/* Also add common executable extensions on windows */
|
||||
if (ext == nil || [ext length] == 0)
|
||||
{
|
||||
NSString *wpath;
|
||||
wpath = [prefix stringByAppendingPathExtension: @"exe"];
|
||||
if ([mgr isExecutableFileAtPath: wpath])
|
||||
return [wpath stringByStandardizingPath];
|
||||
wpath = [prefix stringByAppendingPathExtension: @"com"];
|
||||
if ([mgr isExecutableFileAtPath: wpath])
|
||||
return [wpath stringByStandardizingPath];
|
||||
wpath = [prefix stringByAppendingPathExtension: @"cmd"];
|
||||
if ([mgr isExecutableFileAtPath: wpath])
|
||||
return [wpath stringByStandardizingPath];
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue