Index: ChangeLog
===================================================================
--- ChangeLog	(Revision 4677)
+++ ChangeLog	(Arbeitskopie)
@@ -1,3 +1,13 @@
+2009-02-02  Jens Georg  <mail@jensge.org>
+
+	* plugins/gbf-am/gbf-am-project.c (uri_is_parent), (uri_normalize),
+	(uri_get_chrooted_path):
+	* plugins/gbf-mkfile/gbf-mkfile-project.c (uri_is_parent),
+	(uri_get_chrooted_path):
+	
+	#511589 - fix c&p error in uri_is_parent; fix uri_get_chrooted_path to 
+	return paths starting with "/"
+
 2009-02-02  Carl-Anton Ingmarsson  <ca.ingmarsson@gmail.com>
 
 	* plugins/file-manager/file-manager.glade:
Index: plugins/gbf-am/gbf-am-project.c
===================================================================
--- plugins/gbf-am/gbf-am-project.c	(Revision 4677)
+++ plugins/gbf-am/gbf-am-project.c	(Arbeitskopie)
@@ -308,7 +308,7 @@
 
 	parent = g_file_new_for_commandline_arg (parent_uri);
 	child = g_file_new_for_commandline_arg (child_uri);
-	retval = g_file_equal (parent, child);
+	retval = g_file_has_prefix (child, parent);
 	g_object_unref (parent);
 	g_object_unref (child);
 
@@ -366,8 +366,6 @@
 		g_object_unref (file);
 	}
 
-	GBF_DEBUG (g_debug (G_STRLOC" path_or_uri: %s, base_uri: %s, normalized: %s\n",
-		path_or_uri, base_uri, normalized_uri));
 	return normalized_uri;
 }
 
@@ -393,11 +391,13 @@
 	}
 	else
 	{
-
+		gchar *tmp;
 		root = g_file_new_for_uri (root_uri);
 		file = g_file_new_for_uri (uri);
 
-		path = g_file_get_relative_path (root, file);
+		tmp = g_file_get_relative_path (root, file);
+		path = g_build_filename (G_DIR_SEPARATOR_S, tmp, NULL);
+		g_free (tmp);
 
 		g_object_unref (root);
 		g_object_unref (file);
Index: plugins/gbf-mkfile/gbf-mkfile-project.c
===================================================================
--- plugins/gbf-mkfile/gbf-mkfile-project.c	(Revision 4677)
+++ plugins/gbf-mkfile/gbf-mkfile-project.c	(Arbeitskopie)
@@ -300,7 +300,7 @@
 
 	parent = g_file_new_for_commandline_arg (parent_uri);
 	child = g_file_new_for_commandline_arg (child_uri);
-	retval = g_file_equal (parent, child);
+	retval = g_file_has_prefix (child, parent);
 	g_object_unref (parent);
 	g_object_unref (child);
 
@@ -385,11 +385,13 @@
 	}
 	else
 	{
-
+		char *tmp;
 		root = g_file_new_for_uri (root_uri);
 		file = g_file_new_for_uri (uri);
 
-		path = g_file_get_relative_path (root, file);
+		tmp = g_file_get_relative_path (root, file);
+		path = g_build_filename (G_DIR_SEPARATOR_S, tmp, NULL);
+		g_free (tmp);
 
 		g_object_unref (root);
 		g_object_unref (file);
