diff options
Diffstat (limited to 'shell')
| -rw-r--r-- | shell/ash.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/shell/ash.c b/shell/ash.c index f43d1653f..5d8415a79 100644 --- a/shell/ash.c +++ b/shell/ash.c | |||
| @@ -12674,7 +12674,9 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path) | |||
| 12674 | } | 12674 | } |
| 12675 | #if ENABLE_PLATFORM_MINGW32 | 12675 | #if ENABLE_PLATFORM_MINGW32 |
| 12676 | len = strlen(fullname); | 12676 | len = strlen(fullname); |
| 12677 | if (len > 4 && !strcasecmp(fullname+len-4, ".exe")) { | 12677 | if (len > 4 && |
| 12678 | (!strcasecmp(fullname+len-4, ".exe") || | ||
| 12679 | !strcasecmp(fullname+len-4, ".com"))) { | ||
| 12678 | if (stat(fullname, &statb) < 0) { | 12680 | if (stat(fullname, &statb) < 0) { |
| 12679 | if (errno != ENOENT && errno != ENOTDIR) | 12681 | if (errno != ENOENT && errno != ENOTDIR) |
| 12680 | e = errno; | 12682 | e = errno; |
| @@ -12687,7 +12689,12 @@ find_command(char *name, struct cmdentry *entry, int act, const char *path) | |||
| 12687 | if (stat(fullname, &statb) < 0) { | 12689 | if (stat(fullname, &statb) < 0) { |
| 12688 | if (errno != ENOENT && errno != ENOTDIR) | 12690 | if (errno != ENOENT && errno != ENOTDIR) |
| 12689 | e = errno; | 12691 | e = errno; |
| 12690 | goto loop; | 12692 | memcpy(fullname+len, ".com", 5); |
| 12693 | if (stat(fullname, &statb) < 0) { | ||
| 12694 | if (errno != ENOENT && errno != ENOTDIR) | ||
| 12695 | e = errno; | ||
| 12696 | goto loop; | ||
| 12697 | } | ||
| 12691 | } | 12698 | } |
| 12692 | fullname[len] = '\0'; | 12699 | fullname[len] = '\0'; |
| 12693 | } | 12700 | } |
