Revision: 4920 http://geany.svn.sourceforge.net/geany/?rev=4920&view=rev Author: eht16 Date: 2010-05-16 17:43:10 +0000 (Sun, 16 May 2010)
Log Message: ----------- Fix project base_path detection if the path has a trailing slash.
Modified Paths: -------------- trunk/ChangeLog trunk/src/sidebar.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2010-05-16 17:42:58 UTC (rev 4919) +++ trunk/ChangeLog 2010-05-16 17:43:10 UTC (rev 4920) @@ -2,6 +2,8 @@
* src/prefs.c, src/project.c: win32.h can be included unconditionally. + * src/sidebar.c: + Fix project base_path detection if the path has a trailing slash.
2010-05-15 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
Modified: trunk/src/sidebar.c =================================================================== --- trunk/src/sidebar.c 2010-05-16 17:42:58 UTC (rev 4919) +++ trunk/src/sidebar.c 2010-05-16 17:43:10 UTC (rev 4920) @@ -361,7 +361,11 @@
/* 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)); + { + const gchar *sep = + (project_base_path[len-1] == G_DIR_SEPARATOR) ? NULL : G_DIR_SEPARATOR_S; + setptr(project_base_path, g_strconcat(project_base_path, sep, NULL)); + } if (g_str_has_prefix(tmp_dirname, project_base_path)) { rest = tmp_dirname + len;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.