aboutsummaryrefslogtreecommitdiffstats
path: root/nt/cmdproxy.c
diff options
context:
space:
mode:
authorAndrew Innes1999-03-25 22:54:17 +0000
committerAndrew Innes1999-03-25 22:54:17 +0000
commita5e8ac59ad5fe4400cd96fe863f4b52aadb8e2c6 (patch)
treee06e0c79c48bfc741098a050e4241adfa878bda7 /nt/cmdproxy.c
parent224116b8e99390589b34a51785423d6623ebeb0a (diff)
downloademacs-a5e8ac59ad5fe4400cd96fe863f4b52aadb8e2c6.tar.gz
emacs-a5e8ac59ad5fe4400cd96fe863f4b52aadb8e2c6.zip
(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)
466 466
467 /* Although Emacs always sets argv[0] to an absolute pathname, we 467 /* Although Emacs always sets argv[0] to an absolute pathname, we
468 might get run in other ways as well, so convert argv[0] to an 468 might get run in other ways as well, so convert argv[0] to an
469 absolute name before comparing to the module name. */ 469 absolute name before comparing to the module name. Don't get
470 caught out by mixed short and long names. */
471 GetShortPathName (modname, modname, sizeof (modname));
472 path[0] = '\0';
470 if (!SearchPath (NULL, argv[0], ".exe", sizeof (path), path, &progname) 473 if (!SearchPath (NULL, argv[0], ".exe", sizeof (path), path, &progname)
474 || !GetShortPathName (path, path, sizeof (path))
471 || stricmp (modname, path) != 0) 475 || stricmp (modname, path) != 0)
472 { 476 {
473 /* We are being used as a helper to run a DOS app; just pass 477 /* We are being used as a helper to run a DOS app; just pass