Fix showing project name for documents list files with no

subdirectory (oops).



git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@3999 ea778897-0a13-0410-b9d1-a72fbfd435f5
This commit is contained in:
Nick Treleaven 2009-07-20 15:46:35 +00:00
parent 3c8a24d0fd
commit 4975ce1da9
2 changed files with 6 additions and 2 deletions

View File

@ -13,6 +13,9 @@
* src/utils.c, src/utils.h, src/document.c:
Remove relative/untidy path elements when opening documents (closes
#2823998).
* src/treeviews.c:
Fix showing project name for documents list files with no
subdirectory (oops).
2009-07-19 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>

View File

@ -325,8 +325,9 @@ static GtkTreeIter *get_doc_parent(GeanyDocument *doc)
gsize len = strlen(project_base_path);
const gchar *rest;
/* check whether the dir name uses the project base path */
setptr(project_base_path, g_strconcat(project_base_path, G_DIR_SEPARATOR_S, NULL));
/* check whether the dir name matches or uses the project base path */
if (!utils_str_equal(project_base_path, tmp_dirname))
setptr(project_base_path, g_strconcat(project_base_path, G_DIR_SEPARATOR_S, NULL));
if (g_str_has_prefix(tmp_dirname, project_base_path))
{
rest = tmp_dirname + len;