From 1e68bd2ca699f3388ae149f986b61aa6d105550c Mon Sep 17 00:00:00 2001 From: Ron Yorston Date: Fri, 7 Dec 2018 15:49:54 +0000 Subject: win32: (another) fix to file extension test It turns out '.bat' is a valid batch file name. Reduce the permitted length for filenames to allow for this. Also, actually *use* the file basename in the test this time. --- win32/mingw.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/win32/mingw.c b/win32/mingw.c index 3398e3df4..da77dee36 100644 --- a/win32/mingw.c +++ b/win32/mingw.c @@ -1167,7 +1167,7 @@ static int has_win_suffix(const char *name, int start) const char *bname = bb_basename(name); int i, len = strlen(bname); - if (len > 4 && name[len-4] == '.') { + if (len > 3 && bname[len-4] == '.') { for (i=start; i<4; ++i) { if (!strcasecmp(bname+len-3, win_suffix[i])) { return 1; -- cgit v1.2.3-55-g6feb