aboutsummaryrefslogtreecommitdiff
path: root/libbb/lineedit.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/lineedit.c')
-rw-r--r--libbb/lineedit.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c
index 3725dba0d..0d5ce9082 100644
--- a/libbb/lineedit.c
+++ b/libbb/lineedit.c
@@ -843,6 +843,17 @@ static NOINLINE unsigned complete_cmd_dir_file(const char *command, int type)
843 path1[0] = (char*)"."; 843 path1[0] = (char*)".";
844 844
845 pfind = strrchr(command, '/'); 845 pfind = strrchr(command, '/');
846#if ENABLE_PLATFORM_MINGW32
847 if (!pfind && has_dos_drive_prefix(command) && command[2] != '\0') {
848 char buffer[PATH_MAX];
849
850 /* path is of form c:path with no '/' */
851 if (get_drive_cwd(command, buffer, PATH_MAX)) {
852 pfind = command + 2;
853 path1[0] = xstrdup(buffer);
854 }
855 } else
856#endif
846 if (!pfind) { 857 if (!pfind) {
847 if (type == FIND_EXE_ONLY) 858 if (type == FIND_EXE_ONLY)
848 npaths = path_parse(&paths); 859 npaths = path_parse(&paths);