diff options
Diffstat (limited to 'libbb')
-rw-r--r-- | libbb/executable.c | 3 | ||||
-rw-r--r-- | libbb/lineedit.c | 10 |
2 files changed, 12 insertions, 1 deletions
diff --git a/libbb/executable.c b/libbb/executable.c index 87a40eeda..0a0769ef3 100644 --- a/libbb/executable.c +++ b/libbb/executable.c | |||
@@ -49,6 +49,9 @@ char* FAST_FUNC find_executable(const char *filename, char **PATHp) | |||
49 | 49 | ||
50 | n = strchr(p, PATH_SEP); | 50 | n = strchr(p, PATH_SEP); |
51 | if (n) *n = '\0'; | 51 | if (n) *n = '\0'; |
52 | #if ENABLE_PLATFORM_MINGW32 | ||
53 | p = auto_add_system_drive(p); | ||
54 | #endif | ||
52 | p = concat_path_file( | 55 | p = concat_path_file( |
53 | p[0] ? p : ".", /* handle "::" case */ | 56 | p[0] ? p : ".", /* handle "::" case */ |
54 | filename | 57 | filename |
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index a36a1647d..f6577e372 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -913,8 +913,12 @@ static NOINLINE unsigned complete_cmd_dir_file(const char *command, int type) | |||
913 | struct dirent *next; | 913 | struct dirent *next; |
914 | struct stat st; | 914 | struct stat st; |
915 | char *found; | 915 | char *found; |
916 | 916 | #if ENABLE_PLATFORM_MINGW32 | |
917 | char *lpath = auto_add_system_drive(paths[i]); | ||
918 | dir = opendir(lpath); | ||
919 | #else | ||
917 | dir = opendir(paths[i]); | 920 | dir = opendir(paths[i]); |
921 | #endif | ||
918 | if (!dir) | 922 | if (!dir) |
919 | continue; /* don't print an error */ | 923 | continue; /* don't print an error */ |
920 | 924 | ||
@@ -929,7 +933,11 @@ static NOINLINE unsigned complete_cmd_dir_file(const char *command, int type) | |||
929 | if (!is_prefixed_with(name_found, pfind)) | 933 | if (!is_prefixed_with(name_found, pfind)) |
930 | continue; /* no */ | 934 | continue; /* no */ |
931 | 935 | ||
936 | #if ENABLE_PLATFORM_MINGW32 | ||
937 | found = concat_path_file(lpath, name_found); | ||
938 | #else | ||
932 | found = concat_path_file(paths[i], name_found); | 939 | found = concat_path_file(paths[i], name_found); |
940 | #endif | ||
933 | /* NB: stat() first so that we see is it a directory; | 941 | /* NB: stat() first so that we see is it a directory; |
934 | * but if that fails, use lstat() so that | 942 | * but if that fails, use lstat() so that |
935 | * we still match dangling links */ | 943 | * we still match dangling links */ |