diff options
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 14 |
1 files changed, 13 insertions, 1 deletions
@@ -491,6 +491,8 @@ static int open_binaries(char **files, int count) int result; /* Bilan à retourner */ GStudyProject *project; /* Projet courant à compléter */ int i; /* Boucle de parcours */ + GContentAttributes *attribs; /* Attributs à lier au contenu */ + const char *filename; /* Chemin d'accès au contenu */ GBinContent *content; /* Contenu binaire à charger */ result = EXIT_SUCCESS; @@ -499,16 +501,26 @@ static int open_binaries(char **files, int count) for (i = 0; i < count && result == EXIT_SUCCESS; i++) { - content = g_file_content_new(files[i]); + attribs = g_content_attributes_new(files[i]); + + filename = g_content_attributes_get_filename(attribs); + + content = g_file_content_new(filename); if (content != NULL) { + g_binary_content_set_attributes(content, attribs); + g_study_project_discover_binary_content(project, content, !is_batch_mode(), NULL, NULL); g_object_unref(G_OBJECT(content)); + } else + { + g_object_unref(G_OBJECT(attribs)); result = EXIT_FAILURE; + } } |