summaryrefslogtreecommitdiff
path: root/nt/cmdproxy.c
diff options
context:
space:
mode:
authorAndrew Innes <andrewi@gnu.org>1999-03-25 22:54:17 +0000
committerAndrew Innes <andrewi@gnu.org>1999-03-25 22:54:17 +0000
commit90ca01c04d44959080e24de8c5f20c608e7bb391 (patch)
treed895fd9e981148356d1edc76d73d7914bec41e1e /nt/cmdproxy.c
parent001c4fb6c600cdb1f5ebd4472d1c21cb734d0361 (diff)
downloademacs-90ca01c04d44959080e24de8c5f20c608e7bb391.tar.gz
(main): Call GetShortPathName to normalize program
names for comparison.
Diffstat (limited to 'nt/cmdproxy.c')
-rw-r--r--nt/cmdproxy.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/nt/cmdproxy.c b/nt/cmdproxy.c
index 16f24065d02..9b50cfe0d27 100644
--- a/nt/cmdproxy.c
+++ b/nt/cmdproxy.c
@@ -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