Boost C++ Libraries: Ticket #13642: Strange behaviour of filesystem::relative on Windows https://svn.boost.org/trac10/ticket/13642 <p> The following code snippet behaves unexpected under Windows: </p> <p> </p> <pre class="wiki"> path base("C:\\Temp"); path contained ("c:\\temp\\test"); path result = relative(contained, base); std::cout &lt;&lt; "relative returns " &lt;&lt; result.generic_string() &lt;&lt; "\n"; </pre><p> It returns an empty path, though the expected result would be something like ".\test". This is due to a case sensitive comparison, which is not consistent with how Windows treats path names. </p> <p> I understand that this is the way it is documented, but if Boost.Filesystem is understood to be an abstraction layer over different operating systems, this is definitely not the desired behaviour. </p> <p> I have attached a patch, which fixes the problem. </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/13642 Trac 1.4.3 martin.apel@… Wed, 25 Jul 2018 12:22:04 GMT attachment set https://svn.boost.org/trac10/ticket/13642 https://svn.boost.org/trac10/ticket/13642 <ul> <li><strong>attachment</strong> → <span class="trac-field-new">bfs-relative.patch</span> </li> </ul> Ticket