diff options
-rw-r--r-- | debianutils/which.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/debianutils/which.c b/debianutils/which.c index 10ddb008c..59dedf58d 100644 --- a/debianutils/which.c +++ b/debianutils/which.c | |||
@@ -50,6 +50,11 @@ int which_main(int argc UNUSED_PARAM, char **argv) | |||
50 | puts(path); | 50 | puts(path); |
51 | continue; | 51 | continue; |
52 | } | 52 | } |
53 | memcpy(path+len, ".com", 5); | ||
54 | if (execable_file(path)) { | ||
55 | puts(path); | ||
56 | continue; | ||
57 | } | ||
53 | } | 58 | } |
54 | status = EXIT_FAILURE; | 59 | status = EXIT_FAILURE; |
55 | } else { | 60 | } else { |
@@ -90,6 +95,11 @@ int which_main(int argc UNUSED_PARAM, char **argv) | |||
90 | puts(path); | 95 | puts(path); |
91 | continue; | 96 | continue; |
92 | } | 97 | } |
98 | memcpy(path+len, ".com", 5); | ||
99 | if (execable_file(path)) { | ||
100 | puts(path); | ||
101 | continue; | ||
102 | } | ||
93 | } | 103 | } |
94 | } else { | 104 | } else { |
95 | char *path2 = xstrdup(path); | 105 | char *path2 = xstrdup(path); |