# HG changeset patch # User Andrew Innes # Date 922402457 0 # Node ID d519b387b8a906adaa0170100efe1ae9f3ecfa80 # Parent ef4a540c34ff6674685f6c744beee2b86c929584 (main): Call GetShortPathName to normalize program names for comparison. diff -r ef4a540c34ff -r d519b387b8a9 nt/cmdproxy.c --- 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