<p>This proves that I'm not good at documenting such things for end users :-)</p>
<p>There is additional confusion since your example has two foo folders and the project is named foo as well. I'll rename to illustrate:</p>
<pre><code>/data -- the raid array mount point
    foo
        bar -- the git tree and the project base dir in baz.geany
             src
                 xx.cpp
                 lots more source
        baz.geany -- project name renamed from foo to baz
        dev_build -- out of tree build dir
              foo -- the executable
              test_output -- unit test output file
              lots more stuff the build makes
</code></pre>
<p>So accordingly, in your next example foo/src becomes bar/src.</p>
<p>If xx.cpp and test_output are open, then it's displayed as follows:</p>
<pre><code>baz
  src
    xx.cpp
/data/foo/dev_build
  test_output
</code></pre>
<p>This is because of the following rules:</p>
<ul>
<li>The directory of a filename is folded as much as possible</li>
<li>if two or more documents have common parents, then a tree is formed at that parent (repeat for any common parent encountered)</li>
<li>If a project is open, then the project's base path will get a separate tree node at the root (labeled after the project). This happens regardless of whether parts of the project base path has common parents with open documents outside of the project. Folding of subdirectories (below the project base path) is performed if possible.</li>
</ul>
<p>Compare to the situation when there is no project open:</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/pull/1813#issuecomment-378490609">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/ABDrJ7kJok5LYUWseHD9djVCk461nqXnks5tlGMOgaJpZM4SyLKn">mute the thread</a>.<img src="https://github.com/notifications/beacon/ABDrJxdqBOTDPsvGvgSNfCr-cQMq4qVRks5tlGMOgaJpZM4SyLKn.gif" height="1" width="1" alt="" /></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/pull/1813#issuecomment-378490609"></link>
  <meta itemprop="name" content="View Pull Request"></meta>
</div>
<meta itemprop="description" content="View this Pull Request on GitHub"></meta>
</div>

<script type="application/json" data-scope="inboxmarkup">{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/geany/geany","title":"geany/geany","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/geany/geany"}},"updates":{"snippets":[{"icon":"PERSON","message":"@kugel- in #1813: This proves that I'm not good at documenting such things for end users :-)\r\n\r\nThere is additional confusion since your example has two foo folders and the project is named foo as well. I'll rename to illustrate:\r\n\r\n```\r\n/data -- the raid array mount point\r\n    foo\r\n        bar -- the git tree and the project base dir in baz.geany\r\n             src\r\n                 xx.cpp\r\n                 lots more source\r\n        baz.geany -- project name renamed from foo to baz\r\n        dev_build -- out of tree build dir\r\n              foo -- the executable\r\n              test_output -- unit test output file\r\n              lots more stuff the build makes\r\n```\r\n\r\nSo accordingly, in your next example foo/src becomes bar/src.\r\n\r\nIf xx.cpp and test_output are open, then it's displayed as follows:\r\n\r\n```\r\nbaz\r\n  src\r\n    xx.cpp\r\n/data/foo/dev_build\r\n  test_output\r\n```\r\n\r\nThis is because of the following rules:\r\n- The directory of a filename is folded as much as possible\r\n- if two or more documents have common parents, then a tree is formed at that parent (repeat for any common parent encountered)\r\n- If a project is open, then the project's base path will get a separate tree node at the root (labeled after the project). This happens regardless of whether parts of the project base path has common parents with open documents outside of the project. Folding of subdirectories (below the project base path) is performed if possible.\r\n\r\nCompare to the situation when there is no project open:\r\n"}],"action":{"name":"View Pull Request","url":"https://github.com/geany/geany/pull/1813#issuecomment-378490609"}}}</script>