<p>Here I used <code>cmp = compare_docs_by_filename(&doc_a, &doc_b);</code> instead.</p>

<p>I think it's still better to not skip getting the basename of the file's path, since <code>get_doc_path()</code> might return similar <code>dirname</code>'s for files opened with <code>~</code> argument and <code>/home/user</code>, and comparing the two alike pathnames having different actual <code>dirname</code>'s would make a different comparison result.</p>

<p>I'm not sure how <code>get_doc_folder</code> actually behaves, but it would better to just wrap it up anyway so that any changes that may happen in <code>get_doc_folder</code> in the future would not affect the compare functions.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/commit/b1528f01e240379c0f75ae0c2f50829b271c0f30#commitcomment-18463862">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJzTPOh1sIXh_1-sbdBDnEk1QNa8rks5qbLcOgaJpZM4JY35g">mute the thread</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJxQtdWEw94wjL3RTjUqjIdBHCL0eks5qbLcOgaJpZM4JY35g.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/commit/b1528f01e240379c0f75ae0c2f50829b271c0f30#commitcomment-18463862"></link>
  <meta itemprop="name" content="View Commit"></meta>
</div>
<meta itemprop="description" content="View this Commit on GitHub"></meta>
</div>