|
Boost Users : |
From: Beman Dawes (bdawes_at_[hidden])
Date: 2005-06-07 08:35:02
At 07:58 PM 3/15/2005, Sebastien Martel wrote:
>Hello,
>
> The windows implementation for find_first_file is flawed for
> windows 98. The problem is appending \* to the dir path: this is
> not supported for win98.
>
> Here is a possible fix that has been working for me quite well.
>
> inline const char * find_first_file( const char * dir,
> BOOST_HANDLE & handle, BOOST_SYSTEM_DIRECTORY_TYPE & data )
> {
> // std::cout << "find_first_file " << dir << std::endl;
>
> // \* is not supported on win98
> //std::string dirpath( std::string(dir) + "\\*" );
>
> std::string dirpath( dir );
> dirpath += ( dirpath.empty() || dirpath[dirpath.size()-1] != '\\'
)
>? "\\*" : "*";
>
> return ( (handle = ::FindFirstFileA( dirpath.c_str(), &data ))
> == BOOST_INVALID_HANDLE_VALUE ) ? 0 : data.cFileName;
> }
OK, fixed in CVS for both HEAD and i18n branch.
Sorry for the delay.
--Beman
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net