Use older and so hopefully compatible with all MinGW versions
PathMatchSpec() instead as we don't use any of the newer function flags
and it seems to behave identically with the default flag.
Recent commit corrected handling of "*.*", which previously didn't match
the files without extensions, but still left handling of patterns such
as "x*.*" broken, because they are also supposed to match all files
starting with "x" under Windows, whether they have an extension or not.
Fix this by using PathMatchSpecEx() shell function which should handle
this correctly and update the unit test to check for this case as well.
Using "*.*" as a wildcard is supposed to match everything under MSW, but
ever since the changes of 4daceaacbd (Check that files returned from
wxDir::FindXXX() match the filter., 2013-04-08, see #3432) it only
matched the files with extension because we double-checked the match
returned by the native MSW function (which does handle "*.*" correctly)
using our own wxString::Matches() which doesn't handle it specially.
Fix this by skipping the call to Matches() when "*.*" is used: we know
that this wildcard matches everything, so rechecking the match would be
useless at best, even if it were not actively harmful. And also skip
this call for "*" because calling Matches("*") always succeeds anyhow.
This also fixes the same bug in wxFind{First,Next}File() and any other
code using them such as wx{File,Dir}Ctrl.
Closes#23905.
This keyword is not expanded by Git which means it's not replaced with the
correct revision value in the releases made using git-based scripts and it's
confusing to have lines with unexpanded "$Id$" in the released files. As
expanding them with Git is not that simple (it could be done with git archive
and export-subst attribute) and there are not many benefits in having them in
the first place, just remove all these lines.
If nothing else, this will make an eventual transition to Git simpler.
Closes#14487.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@74602 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It is wrong to use dir.GetName()+"/" to obtain a slash-terminated directory
name as this results in (usually harmless but at best ugly) double slashes at
at the beginning of the string for the root directory. Add GetNameWithSep() to
obtain the correct result in all cases.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
"C:" drive doesn't need to exist under Windows, rely on HOMEDRIVE environment
variable defined in all recent Windows versions to get a valid drive letter
(still fall back to "C:" if the variable is not defined -- we could have use
wxFSVolume to find it then but this seems like an overkill).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65744 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
fix test cases /usr//bin and /usr///bin: they succeed because wxDir::Exists does not care about redundant path separator (and this holds also for non-Unix platforms);
add some more test case
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64678 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775