aboutsummaryrefslogtreecommitdiff
path: root/debianutils/which.c
diff options
context:
space:
mode:
Diffstat (limited to 'debianutils/which.c')
-rw-r--r--debianutils/which.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/debianutils/which.c b/debianutils/which.c
index 9060a5b47..0b0a6a645 100644
--- a/debianutils/which.c
+++ b/debianutils/which.c
@@ -66,17 +66,18 @@ int which_main(int argc UNUSED_PARAM, char **argv)
66 66
67 /* If file contains a slash don't use PATH */ 67 /* If file contains a slash don't use PATH */
68 if (strchr(*argv, '/') || (ENABLE_PLATFORM_MINGW32 && strchr(*argv, '\\'))) { 68 if (strchr(*argv, '/') || (ENABLE_PLATFORM_MINGW32 && strchr(*argv, '\\'))) {
69 if (file_is_executable(*argv)) {
70 missing = 0;
71 puts(*argv);
72 }
73#if ENABLE_PLATFORM_MINGW32 69#if ENABLE_PLATFORM_MINGW32
74 else if ((p=add_win32_extension(*argv)) != NULL) { 70 if ((p=add_win32_extension(*argv)) != NULL) {
75 missing = 0; 71 missing = 0;
76 puts(p); 72 puts(p);
77 free(p); 73 free(p);
78 } 74 }
75 else
79#endif 76#endif
77 if (file_is_executable(*argv)) {
78 missing = 0;
79 puts(*argv);
80 }
80 } else { 81 } else {
81 char *path; 82 char *path;
82 83