Boost C++ Libraries: Ticket #6187: boost::filesystem::exists will thought a string is which include zero, is a file, exactly is the file is not exist. https://svn.boost.org/trac10/ticket/6187 <p> A string like this; std::string path = "/usr/lib/"; path.append(2, 0x0); path.append(3, 'x'); </p> <p> boost::filesystem::exists function will thought this 'path' is a directory. </p> <p> thanks regards. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/6187 Trac 1.4.3 viboes Mon, 12 Dec 2011 22:37:29 GMT component changed; owner set https://svn.boost.org/trac10/ticket/6187#comment:1 https://svn.boost.org/trac10/ticket/6187#comment:1 <ul> <li><strong>owner</strong> set to <span class="trac-author">Beman Dawes</span> </li> <li><strong>component</strong> <span class="trac-field-old">None</span> → <span class="trac-field-new">filesystem</span> </li> </ul> Ticket alexis.legoadec@… Sat, 07 May 2016 09:10:44 GMT <link>https://svn.boost.org/trac10/ticket/6187#comment:2 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/6187#comment:2</guid> <description> <p> Hello, </p> <p> I have opened a pull-request with the fix here: <a class="ext-link" href="https://github.com/boostorg/filesystem/pull/28"><span class="icon">​</span>https://github.com/boostorg/filesystem/pull/28</a> </p> </description> <category>Ticket</category> </item> <item> <dc:creator>Beman Dawes</dc:creator> <pubDate>Thu, 24 Nov 2016 20:38:03 GMT</pubDate> <title>status changed; resolution set https://svn.boost.org/trac10/ticket/6187#comment:3 https://svn.boost.org/trac10/ticket/6187#comment:3 <ul> <li><strong>status</strong> <span class="trac-field-old">new</span> → <span class="trac-field-new">closed</span> </li> <li><strong>resolution</strong> → <span class="trac-field-new">invalid</span> </li> </ul> <p> It isn't the job of class path to decide on validity of strings passed to it. </p> <p> Asian character encodings may have embedded '\0' characters. Shift-JIS is an example, IIRC. If you know the encoding of a string that is going to be used as a path, you could check it for validity before passing it to a path. </p> <p> Thanks, </p> <p> --Beman </p> Ticket