changeset 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 ef4a540c34ff
children e422a11cf832
files nt/cmdproxy.c
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
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