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

<hr>

<p>In <a href="https://github.com/geany/geany/pull/2586#discussion_r488624818">src/project.c</a>:</p>
<pre style='color:#555'>> @@ -772,6 +772,36 @@ static gboolean update_config(const PropertyDialogElements *e, gboolean new_proj
                }
                g_free(locale_path);
        }
+
+       /* create filename path if it doesn't exist and if file name ends with '.geany' */
+       if ((err_code = utils_is_file_writable(locale_filename)) != 0 &&
</pre>
<p>Thanks <a class="user-mention" data-hovercard-type="user" data-hovercard-url="/users/codebrainz/hovercard" data-octo-click="hovercard-link-click" data-octo-dimensions="link_type:self" href="https://github.com/codebrainz">@codebrainz</a> I applied this change.</p>
<p>I think my change was leaking <code>locale_filename</code>, so I did the same logic used for <code>base_path</code>:</p>
<div class="highlight highlight-source-diff"><pre><span class="pl-mi1"><span class="pl-mi1">+</span>               if (err_code != 0)</span>
                {
<span class="pl-md"><span class="pl-md">-</span>                       g_free(filename_path);</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>                       SHOW_ERR1(_("Filename path could not be created (%s)."), g_strerror(err_code));</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>                       gtk_widget_grab_focus(e->file_name);</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>                       utils_free_pointers(2, project_file_dirname, locale_filename, NULL);</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>                       return FALSE;</span>
                }
        }</pre></div>
<p>I also think the TODO should be handled the same way as when the user opts for not creating the <code>Base Path</code>, so we have consistency:</p>
<div class="highlight highlight-source-diff"><pre><span class="pl-mi1"><span class="pl-mi1">+</span>       else</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>       {</span>
<span class="pl-md"><span class="pl-md">-</span>                // TODO: should this be handled?</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>               gtk_widget_grab_focus(e->file_name);</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>               utils_free_pointers(2, project_file_dirname, locale_filename, NULL);</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>               return FALSE;</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>       }</span>
<span class="pl-mi1"><span class="pl-mi1">+</span></span>
<span class="pl-mi1"><span class="pl-mi1">+</span>       g_free(project_file_dirname);</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#discussion_r488624818">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJY3GDAQCCREA2Y34O3SF5MR5ANCNFSM4RLUS2GA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AAIOWJY5TM7HASSQ2QSYE6TSF5MR5A5CNFSM4RLUS2GKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGODUP5Y4Y.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#discussion_r488624818",
"url": "https://github.com/geany/geany/pull/2586#discussion_r488624818",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>