<table><tr><td style="">rjvbb added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D7930" rel="noreferrer">View Revision</a></tr></table><br /><div><div><p>Some tinkering with KDevelop::Path : forcing it to use canonical paths via</p>
<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="diff" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);"><span style="color: #000080">diff --git a/kdevplatform/util/path.cpp b/kdevplatform/util/path.cpp</span>
<span style="color: #000080">index edcbfbe9adbcdb80b8b51759099aad0cc9e7deb1..33a5a1596eadec7e650555b1a948eb26ff17b685 100644</span>
<span style="color: #a00000">--- a/kdevplatform/util/path.cpp</span>
<span style="color: #00a000">+++ b/kdevplatform/util/path.cpp</span>
<span style="color: #800080">@@ -403,7 +404,9 @@ void Path::addPath(const QString& path)</span>
return;
}
<span style="color: #a00000">- const auto& newData = splitPath(path);</span>
<span style="color: #00a000">+ // convert local paths to canonical if not adding it to an existing path</span>
<span style="color: #00a000">+ bool convertToCanonical = m_data.isEmpty() && QUrl(path).isLocalFile();</span>
<span style="color: #00a000">+ const auto& newData = splitPath(convertToCanonical ? QFileInfo(path).canonicalFilePath() : path);</span>
if (newData.isEmpty()) {
if (m_data.size() == (isRemote() ? 1 : 0)) {
// this represents the root path, we just turned an invalid path into it</pre></div>
<p>doesn't seem to break anything (including the test_path unittest). To be exhaustive I'd need to figure out a clever & efficient way (that doesn't recurse out of bounds) to create canonical paths also when appending a segment to an already existing path.</p>
<p>R.</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R32 KDevelop</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D7930" rel="noreferrer">https://phabricator.kde.org/D7930</a></div></div><br /><div><strong>To: </strong>rjvbb, KDevelop, apol<br /><strong>Cc: </strong>mwolff, apol, kdevelop-devel, geetamc, Pilzschaf, akshaydeo, surgenight, arrowdodger<br /></div>