@codebrainz commented on this pull request.


> @@ -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) {

FWIW, the GLib library that Geany uses has some [higher level string 
functions](https://developer.gnome.org/glib/stable/glib-String-Utility-Functions.html).

So like the above could be replaced with:

```c
if (g_str_has_suffix(locale_filename, ".geany"))
{
   ...
```

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/2586#pullrequestreview-488260136

Reply via email to