From: Andrew Innes Date: Thu, 25 Mar 1999 22:54:17 +0000 (+0000) Subject: (main): Call GetShortPathName to normalize program X-Git-Tag: emacs-20.4~433 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=a5e8ac59ad5fe4400cd96fe863f4b52aadb8e2c6;p=emacs.git (main): Call GetShortPathName to normalize program names for comparison. --- 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