[Github-comments] [geany/geany] use relative path in project file (#2667)
Keuronde
notifications at xxxxx
Fri Nov 20 19:10:46 UTC 2020
@Keuronde commented on this pull request.
> @@ -1218,6 +1242,21 @@ static gboolean open_session_file(gchar **tmp, guint len)
unescaped_filename = g_uri_unescape_string(tmp[7], NULL);
locale_filename = utils_get_locale_from_utf8(unescaped_filename);
+ /* is the locale_filename absolute or relative ? */
+ if(g_path_is_absolute(locale_filename) && root_folder)
+ {
+ geany_debug("Absolute path");
+ }
+ else
+ {
+ geany_debug("Relative path %s, root folder %s", locale_filename, root_folder);
+ gchar *absolute_path;
+ absolute_path = g_strconcat(root_folder, &(locale_filename[1]), NULL);
Logic was crappy ! I correct that.
If path is relative an root_folder is null, we have a problem, that shouldn't happen.
The only way to produce it would be if you have relative path in your default session file... I think...
--
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/2667#discussion_r527916305
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20201120/436438ee/attachment.htm>
More information about the Github-comments
mailing list