Boost C++ Libraries: Ticket #577: change_extension throw an invalid name exception https://svn.boost.org/trac10/ticket/577 <pre class="wiki">path change_extension(const path&amp; ph, const std::string&amp; new_extension) { return ph.branch_path() / basename(ph) + new_extension; } If we try with this code : string str = "toto titi.exe"; path p(str, native); path p2 = change_extension(p, ".txt"); Then in change_extension, basename will return a string, and / operator will throw an invalid name as "toto titi" is not a valid path. I made this correction : path change_extension(const path&amp; ph, const std::string&amp; new_extension) { return ph.branch_path() / path(basename(ph) + new_extension, native); } And it seems to be ok now. </pre> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/577 Trac 1.4.3 geraldgg Tue, 07 Mar 2006 09:26:57 GMT <link>https://svn.boost.org/trac10/ticket/577#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/577#comment:1</guid> <description> <pre class="wiki">Logged In: YES user_id=1469762 I added this bug. </pre> </description> <category>Ticket</category> </item> <item> <dc:creator>beman_dawes</dc:creator> <pubDate>Fri, 17 Mar 2006 02:42:17 GMT</pubDate> <title>status changed https://svn.boost.org/trac10/ticket/577#comment:2 https://svn.boost.org/trac10/ticket/577#comment:2 <ul> <li><strong>status</strong> <span class="trac-field-old">assigned</span> → <span class="trac-field-new">closed</span> </li> </ul> <pre class="wiki">Logged In: YES user_id=51042 In release 1.34 and later, native paths are identified automatically, so there is no longer any need for the native constructor. Thanks, --Beman </pre> Ticket