Boost C++ Libraries: Ticket #13406: Boost 1.65.1 : Boost filesystem error codes for non existent files seems to be incorrect https://svn.boost.org/trac10/ticket/13406 <p> Boost::filesystem::equivalent() when called on two non-existent files , error codes generated seems to be incorrect. </p> <p> I am attaching simple test case which calls boost::filesystem::equivalent() on two non-existent files. </p> <p> #include "boost/filesystem/operations.hpp" #include &lt;iostream&gt; int main() { </p> <blockquote> <p> boost::filesystem::path path1("foo"); boost::filesystem::path path2("bar"); boost::system::error_code ec; if(!boost::filesystem::equivalent(path1,path2,ec)) { </p> <blockquote> <p> std::cout&lt;&lt;"error code: " &lt;&lt; ec &lt;&lt; std::endl;; std::cout&lt;&lt;"error message: " &lt;&lt; ec.message() &lt;&lt; std::endl;; </p> </blockquote> </blockquote> <blockquote> <p> } return 0; </p> </blockquote> <p> } </p> <p> The output of the test case with boost 1.56 is </p> <p> <strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong> error code: system:2 error message: No such file or directory </strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong> </p> <p> The output of the test case with boost 1.65 is </p> <p> <strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong>* error code: system:1 error message: Operation not permitted </strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong><strong></strong>* </p> <p> Is this change an intentional one or a bug? </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13406 Trac 1.4.3 Kohei Takahashi Fri, 19 Jan 2018 06:33:53 GMT component changed; owner set https://svn.boost.org/trac10/ticket/13406#comment:1 https://svn.boost.org/trac10/ticket/13406#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