"Same filename and directory in other branches" shows links to files with the same filename but contained in different directories
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3460149. -->
Reported by: [avpaderno](https://www.drupal.org/user/55077)
>>>
<p>Looking at <a href="https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Block%21Attribute%21Block.php/11.x">the documentation page for the <em>core/lib/Drupal/Core/Block/Attribute/Block.php</em> file</a>, I noticed that the linked pages shown in <em>Same filename and directory in other branches</em> are for files contained in different directories, even if the filename is the same.</p>
<p><a href="https://www.drupal.org/files/issues/2024-07-09/06f18404e548a19638903cf2394f53d7.png"><img src="https://www.drupal.org/files/issues/2024-07-09/06f18404e548a19638903cf2394f53d7.png" alt="screenshot"></a></p>
<p><em>core/modules/block/src/Plugin/migrate/source/Block.php</em> and <em>core/lib/Drupal/Core/Block/Annotation/Block.php</em> are not contained in the <em>core/lib/Drupal/Core/Block/Attribute</em> directory.</p>
<p>Similarly, <a href="https://api.drupal.org/api/drupal/core%21lib%21Drupal%21Core%21Block%21Attribute%21Block.php/class/Block/11.x">the documentation page for the <code>Block</code> class</a>, in <em>Same name and namespace in other branches</em>, shows links that should not be there.</p>
<p><a href="https://www.drupal.org/files/issues/2024-07-09/893a8b5a273e7368a91221731446a0be.png"><img src="https://www.drupal.org/files/issues/2024-07-09/893a8b5a273e7368a91221731446a0be.png" alt="screenshot"></a></p>
> Related issue: [Issue #3051656](https://www.drupal.org/node/3051656)
issue