diff options
| author | Ron Yorston <rmy@pobox.com> | 2020-08-13 11:19:40 +0100 |
|---|---|---|
| committer | Ron Yorston <rmy@pobox.com> | 2020-08-13 14:58:01 +0100 |
| commit | 5a48290d9bdb827657114c24aa75c67bb1bd0ea7 (patch) | |
| tree | 210de371d64274d68e2693878a2114f7dbd448ab /debianutils | |
| parent | 4319228f3dcf3a5f941140482c30cca227c6ed0b (diff) | |
| download | busybox-w32-5a48290d9bdb827657114c24aa75c67bb1bd0ea7.tar.gz busybox-w32-5a48290d9bdb827657114c24aa75c67bb1bd0ea7.tar.bz2 busybox-w32-5a48290d9bdb827657114c24aa75c67bb1bd0ea7.zip | |
which: handle paths of form 'c:path'
Add another case where paths of the form 'c:path' need special
treatment.
Adds 16 bytes.
Diffstat (limited to 'debianutils')
| -rw-r--r-- | debianutils/which.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/debianutils/which.c b/debianutils/which.c index d749a2c7e..590d50683 100644 --- a/debianutils/which.c +++ b/debianutils/which.c | |||
| @@ -67,8 +67,11 @@ int which_main(int argc UNUSED_PARAM, char **argv) | |||
| 67 | #endif | 67 | #endif |
| 68 | 68 | ||
| 69 | /* If file contains a slash don't use PATH */ | 69 | /* If file contains a slash don't use PATH */ |
| 70 | if (strchr(*argv, '/') || (ENABLE_PLATFORM_MINGW32 && strchr(*argv, '\\'))) { | 70 | #if !ENABLE_PLATFORM_MINGW32 |
| 71 | #if ENABLE_PLATFORM_MINGW32 | 71 | if (strchr(*argv, '/')) { |
| 72 | #else | ||
| 73 | if (strchr(*argv, '/') || strchr(*argv, '\\') || | ||
| 74 | has_dos_drive_prefix(*argv)) { | ||
| 72 | if ((p=auto_win32_extension(*argv)) != NULL) { | 75 | if ((p=auto_win32_extension(*argv)) != NULL) { |
| 73 | missing = 0; | 76 | missing = 0; |
| 74 | puts(bs_to_slash(p)); | 77 | puts(bs_to_slash(p)); |
