anjuta r4324 - in trunk: . plugins/build-basic-autotools



Author: sgranjoux
Date: Mon Oct  6 20:55:13 2008
New Revision: 4324
URL: http://svn.gnome.org/viewvc/anjuta?rev=4324&view=rev

Log:
	* plugins/build-basic-autotools/configuration-list.c:
	Fix #554337 Allow to change build directory to project directory


Modified:
   trunk/ChangeLog
   trunk/plugins/build-basic-autotools/configuration-list.c

Modified: trunk/plugins/build-basic-autotools/configuration-list.c
==============================================================================
--- trunk/plugins/build-basic-autotools/configuration-list.c	(original)
+++ trunk/plugins/build-basic-autotools/configuration-list.c	Mon Oct  6 20:55:13 2008
@@ -372,20 +372,20 @@
 	GFile *root;
 	GFile *build;
 	gchar *rel_uri;
+	gboolean ok;
 	
+	g_free (cfg->build_uri);
 	root = g_file_new_for_uri (list->project_root_uri);
 	build = g_file_new_for_uri (build_uri);
 	
 	rel_uri = g_file_get_relative_path (root, build);
-	if (rel_uri)
-	{
-		g_free (cfg->build_uri);
-		cfg->build_uri = rel_uri;
-	}
+	/* rel_uri could be NULL if root == build */
+	cfg->build_uri = rel_uri;
+	ok = (rel_uri != NULL) || g_file_equal (root, build);
 	g_object_unref (root);
 	g_object_unref (build);
-	
-	return rel_uri != NULL;
+
+	return ok;
 }
 
 gchar *



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]