@Keuronde commented on this pull request.
In src/keyfile.c:
> if (ft == NULL) /* can happen when saving a new file when quitting */ ft = filetypes[GEANY_FILETYPES_NONE]; - locale_filename = utils_get_locale_from_utf8(doc->file_name); + /* project_root_folder contain a path only if the project use relative path */ + if(project_root_folder){ + file_root_folder = g_file_new_for_path(project_root_folder); + file_doc = g_file_new_for_path(doc->file_name); + relative_filename = g_file_get_relative_path(file_root_folder, file_doc); + if(relative_filename){ + /* Append './' so we know it is a relative filename */ + doc_filename = g_strconcat("./",relative_filename, NULL); + }else{ + doc_filename = g_strconcat(doc->file_name, NULL);
I didn't find/understand the g_strdup function, now I do.
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.