diff options
author | Ron Yorston <rmy@pobox.com> | 2025-08-22 06:42:15 +0100 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2025-08-22 06:42:15 +0100 |
commit | cf0fb20033952a6c0fbb98491b32d329d4568d83 (patch) | |
tree | cc43769a9fc76d07041e19e0a2f084e320688551 /libbb | |
parent | 28febf1462be18f052c945df0e26cf16a02669ef (diff) | |
download | busybox-w32-master.tar.gz busybox-w32-master.tar.bz2 busybox-w32-master.zip |
An upstream bug caused '\W' to return an empty string for the
root directory of any drive. bash displays '/' in similar
circumstances on Linux.
Adds 16 bytes.
(GitHub issue #516)
Diffstat (limited to '')
-rw-r--r-- | libbb/lineedit.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/lineedit.c b/libbb/lineedit.c index 77207a427..e0c0a17dc 100644 --- a/libbb/lineedit.c +++ b/libbb/lineedit.c | |||
@@ -2273,7 +2273,7 @@ static void parse_and_put_prompt(const char *prmt_ptr) | |||
2273 | if (c == 'w') | 2273 | if (c == 'w') |
2274 | break; | 2274 | break; |
2275 | cp = strrchr(pbuf, '/'); | 2275 | cp = strrchr(pbuf, '/'); |
2276 | if (cp) | 2276 | if (cp IF_PLATFORM_MINGW32(&& cp[1])) |
2277 | pbuf = (char*)cp + 1; | 2277 | pbuf = (char*)cp + 1; |
2278 | break; | 2278 | break; |
2279 | // bb_process_escape_sequence does this now: | 2279 | // bb_process_escape_sequence does this now: |