<p></p>
<p><b>@codebrainz</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/geany/geany/pull/2586#discussion_r488327448">src/project.c</a>:</p>
<pre style='color:#555'>> @@ -772,6 +772,53 @@ static gboolean update_config(const PropertyDialogElements *e, gboolean new_proj
                }
                g_free(locale_path);
        }
+
+       /* create filename path if it doesn't exist */
+       if ((err_code = utils_is_file_writable(locale_filename)) != 0) {
+
+               /* only create path if filename ends with '.geany' */
+               char *dot = strrchr(locale_filename, '.');
+               if (dot != NULL && strcmp(dot, ".geany") == 0) {
</pre>
<p>FWIW, the GLib library that Geany uses has some <a href="https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html" rel="nofollow">higher level string functions</a>.</p>
<p>So like the above could be replaced with:</p>
<div class="highlight highlight-source-c"><pre><span class="pl-k">if</span> (g_str_has_suffix(locale_filename, <span class="pl-s"><span class="pl-pds">"</span>.geany<span class="pl-pds">"</span></span>))
{
   ...</pre></div>

<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/2586#pullrequestreview-488260136">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJZIOQGSEISHXVRYLXLSF27H3ANCNFSM4RLUS2GA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAIOWJ5VL7KCEJSDYKQ463LSF27H3A5CNFSM4RLUS2GKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGODUNEEKA.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/pull/2586#pullrequestreview-488260136",
"url": "https://github.com/geany/geany/pull/2586#pullrequestreview-488260136",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>