Merged with other changes.

Sun, 10 Mar 2019 19:31:06 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Sun, 10 Mar 2019 19:31:06 +0100
changeset 6850
2728fed832cd
parent 6849
cf82e985940a (current diff)
parent 6848
7682182a0f0f (diff)
child 6870
3938accc6134

Merged with other changes.

--- a/Debugger/DebuggerInterfacePython.py	Sun Mar 10 19:29:42 2019 +0100
+++ b/Debugger/DebuggerInterfacePython.py	Sun Mar 10 19:31:06 2019 +0100
@@ -228,7 +228,15 @@
                 args = Utilities.parseOptionString(rexec) + \
                     [rhost, interpreter, debugClient,
                         noencoding, str(port), redirect, ipaddr]
-                args[0] = Utilities.getExecutablePath(args[0])
+                if Utilities.isWindowsPlatform():
+                    if not os.path.splitext(args[0])[1]:
+                        for ext in [".exe", ".com", ".cmd", ".bat"]:
+                            prog = Utilities.getExecutablePath(args[0] + ext)
+                            if prog:
+                                args[0] = prog
+                                break
+                else:
+                    args[0] = Utilities.getExecutablePath(args[0])
                 process = self.__startProcess(args[0], args[1:],
                                               workingDir=workingDir)
                 if process is None:
@@ -381,7 +389,15 @@
                 args = Utilities.parseOptionString(rexec) + \
                     [rhost, interpreter, debugClient, noencoding,
                      str(port), redirect, ipaddr]
-                args[0] = Utilities.getExecutablePath(args[0])
+                if Utilities.isWindowsPlatform():
+                    if not os.path.splitext(args[0])[1]:
+                        for ext in [".exe", ".com", ".cmd", ".bat"]:
+                            prog = Utilities.getExecutablePath(args[0] + ext)
+                            if prog:
+                                args[0] = prog
+                                break
+                else:
+                    args[0] = Utilities.getExecutablePath(args[0])
                 process = self.__startProcess(args[0], args[1:],
                                               workingDir=workingDir)
                 if process is None:

eric ide

mercurial