aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libbb/lineedit.c2
-rw-r--r--win32/process.c5
2 files changed, 4 insertions, 3 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 14eb16873..f4247d237 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -863,7 +863,7 @@ static NOINLINE unsigned complete_cmd_dir_file(const char *command, int type)
863 /* path is of form c:path with no '/' */ 863 /* path is of form c:path with no '/' */
864 if (get_drive_cwd(command, buffer, PATH_MAX)) { 864 if (get_drive_cwd(command, buffer, PATH_MAX)) {
865 pfind = command + 2; 865 pfind = command + 2;
866 path1[0] = xstrdup(buffer); 866 path1[0] = dirbuf = xstrdup(buffer);
867 } 867 }
868 } else 868 } else
869#endif 869#endif
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);