Kaydet (Commit) 77dd8feb authored tarafından Enrico Tröger's avatar Enrico Tröger

Fix broken "Go Up" if the current path ends with a slash.

git-svn-id: https://geany.svn.sourceforge.net/svnroot/geany/trunk@4926 ea778897-0a13-0410-b9d1-a72fbfd435f5
üst aa05d3be
......@@ -20,6 +20,7 @@
makefile.win32 based Windows builds.
* plugins/filebrowser.c:
Implement reading and evaluating hidden file attribute on Windows.
Fix broken "Go Up" if the current path ends with a slash.
2010-05-15 Enrico Tröger <enrico(dot)troeger(at)uvena(dot)de>
......
......@@ -343,6 +343,9 @@ static void on_current_path(void)
static void on_go_up(void)
{
gsize len = strlen(current_dir);
if (current_dir[len-1] == G_DIR_SEPARATOR)
current_dir[len-1] = '\0';
/* remove the highest directory part (which becomes the basename of current_dir) */
setptr(current_dir, g_path_get_dirname(current_dir));
refresh();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment