Web publication's repositories paths shown if every repository is chosen

pull/59/head
parent a8d9800eda
commit c284c54328

@ -395,6 +395,19 @@ void yon_interface_update(main_window *widgets){
}
int repos_size;
config_str repos = yon_char_parse(key,&repos_size,",");
if (!repos_size){
int temp_size;
config_str contents = yon_dir_get_contents(path,&temp_size);
for (int k=0;k<temp_size;k++){
char *full_content_path = yon_char_unite(path,"/",contents[k],NULL);
if (yon_file_is_directory(full_content_path)&&strcmp(contents[k],"pool")&&strcmp(contents[k],".")&&strcmp(contents[k],"..")){
yon_char_parsed_add_or_create_if_exists(repos,&repos_size,contents[k]);
}
free(full_content_path);
}
yon_char_parsed_free(contents,temp_size);
}
gtk_list_store_set(widgets->WebPublicationList,&iter,1,path,2,yon_char_parsed_to_string(repos,repos_size,"\n"),-1);
int cur_size;
@ -1174,10 +1187,9 @@ void on_web_publish_accept(GtkWidget *, dictionary *dict){
char *final_name = yon_char_is_empty(full_name)||!disabled ? name : yon_char_unite(name,":",full_name,NULL);
char *final = yon_char_unite(enabled?"enable":"disable",":",enable_browser?"listing":"",":",port_enabled?port:"",":",username_check?username:"",":",username_check?yon_char_is_empty(encryption)? user_password:encryption:"",":",username_check?!yon_char_is_empty(encryption)?user_password:"":"",NULL);
if (!yon_char_is_empty(window->name)&&strcmp(final_name,window->name)){
yon_config_remove_by_key(REPOPUBLIC_WEB_command(window->name));
} else {
yon_config_register(REPOPUBLIC_WEB_full(final_name),REPOPUBLIC_WEB_command(final_name),final);
yon_config_remove_by_key(REPOPUBLIC_WEB_full(window->name));
}
yon_config_register(REPOPUBLIC_WEB_full(final_name),REPOPUBLIC_WEB_command(final_name),final);
yon_interface_update(widgets);
gtk_widget_destroy(window->Window);
}

Loading…
Cancel
Save