(main): Call GetShortPathName to normalize program
names for comparison.
This commit is contained in:
parent
224116b8e9
commit
a5e8ac59ad
1 changed files with 5 additions and 1 deletions
|
@ -466,8 +466,12 @@ main (int argc, char ** argv)
|
|||
|
||||
/* Although Emacs always sets argv[0] to an absolute pathname, we
|
||||
might get run in other ways as well, so convert argv[0] to an
|
||||
absolute name before comparing to the module name. */
|
||||
absolute name before comparing to the module name. Don't get
|
||||
caught out by mixed short and long names. */
|
||||
GetShortPathName (modname, modname, sizeof (modname));
|
||||
path[0] = '\0';
|
||||
if (!SearchPath (NULL, argv[0], ".exe", sizeof (path), path, &progname)
|
||||
|| !GetShortPathName (path, path, sizeof (path))
|
||||
|| stricmp (modname, path) != 0)
|
||||
{
|
||||
/* We are being used as a helper to run a DOS app; just pass
|
||||
|
|
Loading…
Add table
Reference in a new issue