aboutsummaryrefslogtreecommitdiff
path: root/win32
diff options
context:
space:
mode:
Diffstat (limited to 'win32')
-rw-r--r--win32/process.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/win32/process.c b/win32/process.c
index 8546c6e2f..4257fd689 100644
--- a/win32/process.c
+++ b/win32/process.c
@@ -320,8 +320,9 @@ mingw_spawn_1(int mode, const char *cmd, char *const *argv, char *const *envp)
320 return mingw_spawn_applet(mode, argv, envp); 320 return mingw_spawn_applet(mode, argv, envp);
321 else 321 else
322#endif 322#endif
323 if (strchr(cmd, '/') || strchr(cmd, '\\')) { 323 if (strchr(cmd, '/') || strchr(cmd, '\\') || has_dos_drive_prefix(cmd)) {
324 return mingw_spawn_interpreter(mode, cmd, argv, envp); 324 const char *path = auto_win32_extension(cmd);
325 return mingw_spawn_interpreter(mode, path ? path : cmd, argv, envp);
325 } 326 }
326 else if ((prog=find_first_executable(cmd)) != NULL) { 327 else if ((prog=find_first_executable(cmd)) != NULL) {
327 intptr_t ret = mingw_spawn_interpreter(mode, prog, argv, envp); 328 intptr_t ret = mingw_spawn_interpreter(mode, prog, argv, envp);