The ways on how a "folder name string" should be created and compared is divided in many parts of get_doc_parent()
and the functions it call. One is from get_folder_name()
itself, another is from find_tree_iter_dir()
(if (utils_str_equal(dir, ".")) dir = GEANY_STRING_UNTITLED;
), and another in the assignment of the item to store_openfiles
(DOCUMENTS_SHORTNAME, doc->file_name ? dirname : GEANY_STRING_UNTITLED
).
The ambiguity causes issues like having multiple parents in the Documents list that has the name .
when the filename has a basename but not a directory name. This can be done by creating multiple new files with a template.
This patch is basically an overhaul to fix the ambiguity, and the issue is fixed along with it. If get_folder_name()
is shared and used somewhere else besides sidebar.c
, it would no longer require a wrapper just to make the returned string consistent.
https://github.com/geany/geany/pull/1199
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.