[Github-comments] [geany/geany] Create project's filename path (#2586)
tivrfoa
notifications at xxxxx
Tue Sep 15 23:56:50 UTC 2020
@tivrfoa commented on this pull request.
> + {
+ gboolean create_dir = dialogs_show_question_full(NULL, GTK_STOCK_OK, GTK_STOCK_CANCEL,
+ _("Create the project's Filename directory?"),
+ _("The path \"%s\" does not exist."),
+ project_file_dirname);
+
+ /* if the project file's directory doesn't exist and the user wants to try and create it */
+ if (create_dir)
+ {
+ /* try and create the project file's directory recursively */
+ err_code = utils_mkdir(project_file_dirname, TRUE);
+ if (err_code != 0)
+ {
+ 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);
But `locale_filename` is created inside the function, and it returns after `utils_free_pointers`, so how would it be used further down?
Also, the code that creates `Base path` does free `locale_filename`:
https://github.com/geany/geany/blob/master/src/project.c#L769
--
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_r489082241
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20200915/493ae696/attachment-0001.htm>
More information about the Github-comments
mailing list