Fixed handling of .com binaries (thanks to Chris Morgan).
This commit is contained in:
parent
2f61c4a1b3
commit
75ce72ea44
|
@ -1104,6 +1104,7 @@ BOOL WINAPI CreateProcessA( LPCSTR app_name, LPSTR cmd_line, LPSECURITY_ATTRIBUT
|
||||||
DOS_FULL_NAME full_dir;
|
DOS_FULL_NAME full_dir;
|
||||||
char name[MAX_PATH];
|
char name[MAX_PATH];
|
||||||
LPSTR tidy_cmdline;
|
LPSTR tidy_cmdline;
|
||||||
|
char *p;
|
||||||
|
|
||||||
/* Process the AppName and/or CmdLine to get module name and path */
|
/* Process the AppName and/or CmdLine to get module name and path */
|
||||||
|
|
||||||
|
@ -1202,11 +1203,18 @@ BOOL WINAPI CreateProcessA( LPCSTR app_name, LPSTR cmd_line, LPSECURITY_ATTRIBUT
|
||||||
retv = create_process( hFile, name, tidy_cmdline, env, process_attr, thread_attr,
|
retv = create_process( hFile, name, tidy_cmdline, env, process_attr, thread_attr,
|
||||||
inherit, flags, startup_info, info, unixdir );
|
inherit, flags, startup_info, info, unixdir );
|
||||||
break;
|
break;
|
||||||
case BINARY_UNIX_EXE:
|
|
||||||
case BINARY_UNKNOWN:
|
case BINARY_UNKNOWN:
|
||||||
|
/* check for .com extension */
|
||||||
|
if ((p = strrchr( name, '.' )) && !FILE_strcasecmp( p, ".com" ))
|
||||||
|
{
|
||||||
|
TRACE( "starting %s as DOS binary\n", debugstr_a(name) );
|
||||||
|
retv = create_process( hFile, name, tidy_cmdline, env, process_attr, thread_attr,
|
||||||
|
inherit, flags, startup_info, info, unixdir );
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
/* fall through */
|
||||||
|
case BINARY_UNIX_EXE:
|
||||||
{
|
{
|
||||||
/* unknown file, try as unix executable */
|
|
||||||
|
|
||||||
DOS_FULL_NAME full_name;
|
DOS_FULL_NAME full_name;
|
||||||
const char *unixfilename = name;
|
const char *unixfilename = name;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue