[anjuta] am-project: objects for sources in subdirectories loose the path
- From: Sebastien Granjoux <sgranjoux src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [anjuta] am-project: objects for sources in subdirectories loose the path
- Date: Wed, 15 Jun 2011 17:18:36 +0000 (UTC)
commit f199fa84ab9d443b5f5990857a4e1866b45d1933
Author: SÃbastien Granjoux <seb sfo free fr>
Date: Wed Jun 15 08:05:25 2011 +0200
am-project: objects for sources in subdirectories loose the path
plugins/am-project/am-project.c | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/plugins/am-project/am-project.c b/plugins/am-project/am-project.c
index f32713e..69ec5a4 100644
--- a/plugins/am-project/am-project.c
+++ b/plugins/am-project/am-project.c
@@ -1030,6 +1030,7 @@ project_load_sources (AmpProject *project, AnjutaProjectNode *group, AnjutaToken
{
/* Create object node */
gchar *object_name;
+ gchar *basename;
gchar *ext;
GFile *obj_file;
AnjutaProjectNode *object;
@@ -1037,7 +1038,9 @@ project_load_sources (AmpProject *project, AnjutaProjectNode *group, AnjutaToken
ext = strrchr (value, '.');
if ((ext != NULL) && (ext != value)) *ext = '\0';
object_name = g_strconcat (value, obj_ext, NULL);
- obj_file = g_file_get_child (group_file, object_name);
+ basename = g_path_get_basename (object_name);
+ obj_file = g_file_get_child (group_file, basename);
+ g_free (basename);
g_free (object_name);
object = amp_node_new_valid (group, ANJUTA_PROJECT_OBJECT | ANJUTA_PROJECT_PROJECT, obj_file, NULL, NULL);
g_object_unref (obj_file);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]