Boost C++ Libraries: Ticket #12904: canonical fails for relative symbolic link on NTFS https://svn.boost.org/trac10/ticket/12904 <p> I've an path inside a directory which is a symbolic link at an NTFS partition. The link points to a another directory in the same base directory. </p> <p> boost throws </p> <pre class="wiki">BOOST_ASSERT_MSG(result.is_absolute(), "canonical() implementation error; please report"); </pre><p> in <code>operations.cpp, line 881</code> </p> <p> Here are more details: I call <code>boost::filesystem::canonical}} with following ({{{const wchar_t*</code>) parameter: </p> <blockquote> <p> <code>L"C:\\Projekte\\50_Workspace\\out\\x64\\.\\audio\\Test.dll"</code> </p> </blockquote> <p> The current working directory is </p> <blockquote> <p> <code>L"C:\\Projekte\\50_Workspace\\out\\x64"</code> </p> </blockquote> <p> which is a symlink to <code>"x64.Debug"}} in the same base directory (in {{{"C:\\Projekte\\50_Workspace\\out"</code>). </p> <p> Boost detects that the <code>"x64"</code> is a relative symbolic link and enters the <code>"else"</code> in <code>line 868</code>. But the created new_source looks strange: </p> <blockquote> <p> <code>"x64.Debug/Projekte\\50_Workspace\\out\\x64\\.\\audio\\Test.dll"</code> </p> </blockquote> <p> In my opinion it should create either </p> <blockquote> <p> <code>"C:\\Project\\50_Workspace\\out\\x64.Debug\\.\\audio\\Test.dll"</code> </p> </blockquote> <p> or </p> <blockquote> <p> <code>"C:/Project/50_Workspace/out/x64.Debug/./audio/Test.dll"</code> </p> </blockquote> <p> for the next loop... </p> en-us Boost C++ Libraries /htdocs/site/boost.png https://svn.boost.org/trac10/ticket/12904 Trac 1.4.3 Matthias@… Tue, 14 Mar 2017 16:36:46 GMT <link>https://svn.boost.org/trac10/ticket/12904#comment:1 </link> <guid isPermaLink="false">https://svn.boost.org/trac10/ticket/12904#comment:1</guid> <description> <p> Additional information </p> <p> In <code>operations.cpp, line 855</code> it declares <code>link</code> and creates it by calling <code>detail::read_symlink(result, ec)</code> <code>result</code> is <code>"C:"</code> in my case, <code>ec</code> is <code>nullptr</code> <code>link</code> will correctly be created as <code>"x64.Debug"</code> Then it calls <code>result.remove_filename();</code> which leads to an empty <code>result</code> in my case and that's the reason why <code>path new_source(result)</code> also gives an empty <code>new_source</code> (in <code>line 868</code> - which looks wrong to me... </p> </description> <category>Ticket</category> </item> </channel> </rss>