@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) {
+
+                       char path_delimiter = '/';
+
+#ifdef G_OS_WIN32
+            path_delimiter = '\\';
+#endif

GLib also has [some handy pre-processor 
macros](https://developer.gnome.org/glib/stable/glib-Standard-Macros.html#G-DIR-SEPARATOR:CAPS)
 which cover this scenario.

-- 
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-488261634

Reply via email to