aboutsummaryrefslogtreecommitdiff
path: root/libbb/executable.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2022-10-26 11:47:42 +0100
committerRon Yorston <rmy@pobox.com>2022-10-26 11:47:42 +0100
commitd71cb67ff91762ae78e87440b87d7c9a160b2937 (patch)
treee378f71776199ff4fe44cb3bc020a8f43278bd2b /libbb/executable.c
parent0b5bd6e1436c38a74c5294535d5f4d7a7cf79d54 (diff)
downloadbusybox-w32-d71cb67ff91762ae78e87440b87d7c9a160b2937.tar.gz
busybox-w32-d71cb67ff91762ae78e87440b87d7c9a160b2937.tar.bz2
busybox-w32-d71cb67ff91762ae78e87440b87d7c9a160b2937.zip
win32: revert special treatment of Unix-style absolute paths
Commit 605972390 (win32: handle Unix-style absolute paths for executables) added special treatment of paths for executables starting with a slash. Such paths are absolute on Unix but are relative to the current drive on Windows. On reflection this commit did more than necessary. Later commits provided special treatment only for paths starting with locations traditionally used to contain binaries on Unix. This is probably sufficient. Problems introduced by commit 605972390 include: - If the current drive isn't the system drive tab completion of a command starting with a slash confusingly references the system drive. - Building busybox-w32 with w64devkit fails on drives other than the system drive. Revert the changes introduced by commit 605972390. This saves 192 bytes. (GitHub issue #239)
Diffstat (limited to 'libbb/executable.c')
-rw-r--r--libbb/executable.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libbb/executable.c b/libbb/executable.c
index 32b37f29d..770aedc0c 100644
--- a/libbb/executable.c
+++ b/libbb/executable.c
@@ -57,7 +57,7 @@ char* FAST_FUNC find_executable(const char *filename, char **PATHp)
57 ); 57 );
58#if ENABLE_PLATFORM_MINGW32 58#if ENABLE_PLATFORM_MINGW32
59 { 59 {
60 char *w = alloc_system_drive(p); 60 char *w = alloc_ext_space(p);
61 ex = add_win32_extension(w) || file_is_executable(w); 61 ex = add_win32_extension(w) || file_is_executable(w);
62 free(p); 62 free(p);
63 p = w; 63 p = w;