mirror of
https://github.com/boostorg/filesystem.git
synced 2026-01-28 19:22:09 +00:00
use a form of directory iteration search Sebastian Martel reports will work with Win98
[SVN r29465]
This commit is contained in:
@@ -165,7 +165,12 @@ namespace
|
||||
// a ERROR_FILE_NOT_FOUND error which we do not considered an error. Instead,
|
||||
// the handle is set to BOOST_INVALID_HANDLE_VALUE and a non-zero is returned.
|
||||
{
|
||||
std::string dirpath( std::string(dir) + "/*" );
|
||||
// use a form of search Sebastian Martel reports will work with Win98
|
||||
std::string dirpath( dir );
|
||||
dirpath += (dirpath.empty()
|
||||
|| (dirpath[dirpath.size()-1] != '\\'
|
||||
&& dirpath[dirpath.size()-1] != '/')) ? "\\*" : "*";
|
||||
|
||||
return ( (handle = ::FindFirstFileA( dirpath.c_str(), &data ))
|
||||
== BOOST_INVALID_HANDLE_VALUE
|
||||
&& ::GetLastError() != ERROR_FILE_NOT_FOUND) ? 0 : data.cFileName;
|
||||
|
||||
Reference in New Issue
Block a user