eric pouech (@epo) commented about programs/cmd/builtins.c:
- if (hIn == INVALID_HANDLE_VALUE) { + havewildcards = wcspbrk(thisArg, L"*?") ? TRUE : FALSE; + + fileNamePart = PathFindFileNameW(thisArg); + + hff = FindFirstFileW(thisArg, &fd); + + if (hff != INVALID_HANDLE_VALUE) { + do { + lstrcpyW(fileNamePart, fd.cFileName); + WINE_TRACE("type: thisArg: '%s'\n", wine_dbgstr_w(thisArg)); + hIn = CreateFileW(thisArg, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, NULL, OPEN_EXISTING, + FILE_ATTRIBUTE_NORMAL, NULL); + if (hIn == INVALID_HANDLE_VALUE) { + + if(fd.dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY && this doesn't match native behavior... all directories are skipped from wild card searches (not just . and ..)
and native prints an error if wild card set only contains directories -- https://gitlab.winehq.org/wine/wine/-/merge_requests/11094#note_142494