[Boost-bugs] [Boost C++ Libraries] #9099: boost::filesystem::stem() reporting wrong value on some entries (seen on Linux)

Subject: [Boost-bugs] [Boost C++ Libraries] #9099: boost::filesystem::stem() reporting wrong value on some entries (seen on Linux)
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2013-09-10 12:52:20


#9099: boost::filesystem::stem() reporting wrong value on some entries (seen on
Linux)
------------------------------+------------------------
 Reporter: bach@… | Owner: bemandawes
     Type: Bugs | Status: new
Milestone: To Be Determined | Component: filesystem
  Version: Boost 1.50.0 | Severity: Problem
 Keywords: |
------------------------------+------------------------
 Compiled with gcc on Linux.

 Consider the following example with an empty string as path:
 {{{
   boost::filesystem::path mypath("");
   cout << mypath.parent_path().native() << endl;
   cout << mypath.stem().native() << endl;
 }}}

 This will print out, as expected, two empty strings. If one now changes
 the path to be analysed into "tmp/", like this:

 {{{
   boost::filesystem::path mypath("tmp/");
   cout << mypath.parent_path().native() << endl;
   cout << mypath.stem().native() << endl;
 }}}

 then the output will be "tmp" on one line (totally expected and correct)
 and "." on the next line (totally unexpected and wrong, it should be an
 empty string).

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/9099>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:14 UTC