diff options
author | Ron Yorston <rmy@pobox.com> | 2024-11-19 09:18:56 +0000 |
---|---|---|
committer | Ron Yorston <rmy@pobox.com> | 2024-11-19 09:18:56 +0000 |
commit | 90c87dc65452889cd79debdc58d46fee76d17726 (patch) | |
tree | ae877f6fd1a6b1843c3a34d279ca1f9a9961fece /include | |
parent | 0e958a72e1780138e68c799792190085cf505ee7 (diff) | |
download | busybox-w32-90c87dc65452889cd79debdc58d46fee76d17726.tar.gz busybox-w32-90c87dc65452889cd79debdc58d46fee76d17726.tar.bz2 busybox-w32-90c87dc65452889cd79debdc58d46fee76d17726.zip |
ash: match behaviour of cmd.exe in cd builtin
The Windows API strips trailing dots and spaces from the last
component of a path. cmd.exe handles this quirk when changing
directory by adjusting its idea of the current directory to match
reality. The shell in busybox-w32 didn't do this, leading to some
confusion.
Fix the shell's cd builtin so it works more like cmd.exe.
Adds 64-80 bytes.
(GitHub issue #478)
Diffstat (limited to 'include')
-rw-r--r-- | include/mingw.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/mingw.h b/include/mingw.h index 5a3c75ff6..c41c0f91e 100644 --- a/include/mingw.h +++ b/include/mingw.h | |||
@@ -631,6 +631,7 @@ MINGW_BB_WCHAR_T *bs_to_slash_u(MINGW_BB_WCHAR_T *p) FAST_FUNC; | |||
631 | 631 | ||
632 | char *bs_to_slash(char *p) FAST_FUNC; | 632 | char *bs_to_slash(char *p) FAST_FUNC; |
633 | void slash_to_bs(char *p) FAST_FUNC; | 633 | void slash_to_bs(char *p) FAST_FUNC; |
634 | void strip_dot_space(char *p) FAST_FUNC; | ||
634 | size_t remove_cr(char *p, size_t len) FAST_FUNC; | 635 | size_t remove_cr(char *p, size_t len) FAST_FUNC; |
635 | 636 | ||
636 | int err_win_to_posix(void); | 637 | int err_win_to_posix(void); |