aboutsummaryrefslogtreecommitdiff
path: root/libbb/executable.c
diff options
context:
space:
mode:
Diffstat (limited to 'libbb/executable.c')
-rw-r--r--libbb/executable.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/libbb/executable.c b/libbb/executable.c
index 0a0769ef3..f549a7aae 100644
--- a/libbb/executable.c
+++ b/libbb/executable.c
@@ -49,20 +49,16 @@ char* FAST_FUNC find_executable(const char *filename, char **PATHp)
49 49
50 n = strchr(p, PATH_SEP); 50 n = strchr(p, PATH_SEP);
51 if (n) *n = '\0'; 51 if (n) *n = '\0';
52#if ENABLE_PLATFORM_MINGW32
53 p = auto_add_system_drive(p);
54#endif
55 p = concat_path_file( 52 p = concat_path_file(
56 p[0] ? p : ".", /* handle "::" case */ 53 p[0] ? p : ".", /* handle "::" case */
57 filename 54 filename
58 ); 55 );
59 if (n) *n++ = PATH_SEP; 56 if (n) *n++ = PATH_SEP;
60#if ENABLE_PLATFORM_MINGW32 57#if ENABLE_PLATFORM_MINGW32
61 if ((w=alloc_win32_extension(p))) { 58 w = alloc_system_drive(p);
62 free(p); 59 add_win32_extension(w);
63 p = w; 60 free(p);
64 /* following test will succeed */ 61 p = w;
65 }
66#endif 62#endif
67 ex = file_is_executable(p); 63 ex = file_is_executable(p);
68 if (ex) { 64 if (ex) {