@tivrfoa commented on this pull request.


> @@ -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 &&

Thanks @codebrainz I applied this change.

I think my change was leaking `locale_filename`, so I did the same logic used 
for `base_path`:

```diff
+               if (err_code != 0)
                {
-                       g_free(filename_path);
+                       SHOW_ERR1(_("Filename path could not be created 
(%s)."), g_strerror(err_code));
+                       gtk_widget_grab_focus(e->file_name);
+                       utils_free_pointers(2, project_file_dirname, 
locale_filename, NULL);
+                       return FALSE;
                }
        }
```
I also think the TODO should be handled the same way as when the user opts for 
not creating the `Base Path`, so we have consistency:
```diff
+       else
+       {
-                // TODO: should this be handled?
+               gtk_widget_grab_focus(e->file_name);
+               utils_free_pointers(2, project_file_dirname, locale_filename, 
NULL);
+               return FALSE;
+       }
+
+       g_free(project_file_dirname);
```

-- 
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#discussion_r488624818

Reply via email to