<p></p>
<p><b>@techee</b> requested changes on this pull request.</p>

<hr>

<p>In <a href="https://github.com/geany/geany-plugins/pull/1126#discussion_r747013859">projectorganizer/src/prjorg-sidebar.c</a>:</p>
<pre style='color:#555'>> +            }
+       }
+       return path;
+}
+
+
+/* if get_dir_of_selection() fails,
+ * returns parent of current document, project folder, or home folder */
+static gchar *get_fallback_dir_of_selection(void)
+{
+       gchar *locale_path;
+
+       /* get path from treeview selection */
+       locale_path = get_dir_of_selection();
+
+       /* get path from current document */
</pre>
<p dir="auto">I still don't understand why there are so many fallbacks tested - the purpose of the added functionality is to open terminal/file browser at the path from the sidebar - if the path for some reason doesn't exist (probably the directory was deleted and project not refreshed), the functionality basically cannot be performed. One option would be not opening the terminal at all which would be weird for the user though because he expects something happens. The other option is to open the terminal at some path we know that exists (but which is "wrong" because it doesn't correspond to the path in the sidebar). There's no "better" or "worse" path in this case - yes, e.g. project base dir or document dir are closer to what the user wanted but they aren't what the user wanted anyway. It's true that the base directory may also not exist so I'd just perform a single fallback to the home directory that you have at the very end of this function.</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-plugins/pull/1126#pullrequestreview-803182754">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ2HEK6DZIPNDMZWJG3ULLSSVANCNFSM5GTVPZ4Q">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<img src="https://github.com/notifications/beacon/AAIOWJ3BB53N5WV6C5SVR4LULLSSVA5CNFSM5GTVPZ42YY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOF7PZRIQ.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany-plugins/pull/1126#pullrequestreview-803182754",
"url": "https://github.com/geany/geany-plugins/pull/1126#pullrequestreview-803182754",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>