diff options
author | Ron Yorston <rmy@pobox.com> | 2020-03-18 10:48:44 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2020-03-18 11:27:05 +0000 |
commit | f9569be1e5ca929d68e28064be3ffadcb0aff784 (patch) | |
tree | de93d003e3baf86ec28d6d3f37098f619a99e1ff /libbb/get_last_path_component.c | |
parent | 5e69872105e69980e5feb0b071a442cd423c59f5 (diff) | |
download | busybox-w32-f9569be1e5ca929d68e28064be3ffadcb0aff784.tar.gz busybox-w32-f9569be1e5ca929d68e28064be3ffadcb0aff784.tar.bz2 busybox-w32-f9569be1e5ca929d68e28064be3ffadcb0aff784.zip |
win32: improve handling of 'c:file' paths for executables
bb_basename() didn't properly handle paths of the form 'c:file'.
Attempting to run 'c:busybox' resulted in 'c:busybox: applet not found'.
The shell had a similar problem: trying to run 'c:busybox' reported
'sh: c:busybox: not found'.
Diffstat (limited to 'libbb/get_last_path_component.c')
-rw-r--r-- | libbb/get_last_path_component.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/get_last_path_component.c b/libbb/get_last_path_component.c index 3a9b9237e..00649620d 100644 --- a/libbb/get_last_path_component.c +++ b/libbb/get_last_path_component.c | |||
@@ -13,7 +13,7 @@ const char* FAST_FUNC bb_basename(const char *name) | |||
13 | #if ENABLE_PLATFORM_MINGW32 | 13 | #if ENABLE_PLATFORM_MINGW32 |
14 | const char *cp; | 14 | const char *cp; |
15 | for (cp = name; *cp; cp++) | 15 | for (cp = name; *cp; cp++) |
16 | if (*cp == '/' || *cp == '\\') | 16 | if (*cp == '/' || *cp == '\\' || *cp == ':') |
17 | name = cp + 1; | 17 | name = cp + 1; |
18 | #else | 18 | #else |
19 | const char *cp = strrchr(name, '/'); | 19 | const char *cp = strrchr(name, '/'); |