Mercurial > emacs
diff nt/cmdproxy.c @ 24516:d519b387b8a9
(main): Call GetShortPathName to normalize program
names for comparison.
| author | Andrew Innes <andrewi@gnu.org> |
|---|---|
| date | Thu, 25 Mar 1999 22:54:17 +0000 |
| parents | 56916b0de547 |
| children | 2bf5c4b2cc5a |
line wrap: on
line diff
--- a/nt/cmdproxy.c Thu Mar 25 22:51:54 1999 +0000 +++ b/nt/cmdproxy.c Thu Mar 25 22:54:17 1999 +0000 @@ -466,8 +466,12 @@ /* 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
