Added repos are now save properly

pull/30/head
parent cb6dfd61a6
commit 9904a17b9a

@ -415,6 +415,7 @@ void on_repo_add_new(GtkWidget *self, dictionary *dict){
char *searchpath = yon_char_unite(name,"/",reponame,"/x86_64/",NULL);
DIR *directory = opendir(searchpath);
if (directory){
char *found_packages = NULL;
while ((de = readdir(directory)))
{
if (strstr(de->d_name,"pkg.tar.")&&!strstr(de->d_name,".sig")){
@ -433,8 +434,10 @@ void on_repo_add_new(GtkWidget *self, dictionary *dict){
}
gtk_tree_store_append(main_config.tree_store,&child,iter);
gtk_tree_store_set(main_config.tree_store,&child,0,document_no_edits,1,yon_char_unite(packname,"-",packver,"-",packarch,NULL),2,filename,3,0,9,packname,10,packver,11,packarch,12,packdepends,-1);
found_packages = yon_char_unite(found_packages ? yon_char_append(found_packages,",") : "",de->d_name,NULL);
}
}
yon_window_config_add_custom_parameter(window->path,"repos",found_packages,YON_TYPE_STRING);
gtk_tree_store_set(main_config.tree_store,iter,0,folder_no_edits,2,window->path,3,0,9,reponame,-1);
} else {
gtk_tree_store_set(main_config.tree_store,iter,0,folder_added,2,window->path,3,1,9,reponame,-1);

Loading…
Cancel
Save