|
Boost : |
From: Beman Dawes (bdawes_at_[hidden])
Date: 2004-09-15 11:02:48
At 11:26 AM 9/14/2004, Angus Leeming wrote:
>There are lots of "#ifdef BOOST_WINDOWS ... #endif" blocks wrapping code
to
>handle the ':' in libs/filesystem/path_posix_windows.cpp. In one place
>only is the preprocessor block missing, which I believe is a bug. Patch
>attached.
>
>Silly test case. Without the patch, this:
>
> #include <boost/filesystem/path.hpp>
> #include <iostream>
> #include <string>
>
> namespace fs = boost::filesystem;
>
> int main()
> {
> std::string const PATH="/usr/local/bin:/usr/bin:/bin";
> fs::path const path(PATH, fs::no_check);
> std::cout << PATH << '\n'
> << path.native_file_string() << std::endl;
> return 0;
> }
>
>Produces
> /usr/local/bin:/usr/bin:/bin
> /usr/local/bin:usr/bin:bin
>under *nix.
Thanks for spotting this. I've added the test case to path_test.cpp, and
applied the patch to fix the problem.
--Beman
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk