Fixed web publication saving when storage or repositories were chenged

pull/121/head
parent b5fbead952
commit 67cbe0a986

@ -69,7 +69,7 @@ void on_web_publish_accept(GtkWidget *, dictionary *dict){
username_check?!yon_char_is_empty(user_password)&&!yon_char_is_empty(encryption)?user_password:"":"", username_check?!yon_char_is_empty(user_password)&&!yon_char_is_empty(encryption)?user_password:"":"",
NULL); NULL);
if (!yon_char_is_empty(window->name)&&strcmp(final_name,window->name)){ if (!yon_char_is_empty(window->name)&&strcmp(final_name,window->name)){
yon_config_remove_by_key(REPOPUBLIC_WEB_full(window->name)); yon_config_remove_by_key(window->name);
} }
yon_config_register(REPOPUBLIC_WEB_full(final_name),REPOPUBLIC_WEB_command(final_name),final); yon_config_register(REPOPUBLIC_WEB_full(final_name),REPOPUBLIC_WEB_command(final_name),final);
yon_interface_update(widgets); yon_interface_update(widgets);
@ -130,6 +130,9 @@ void on_web_user_check(GtkToggleButton *self, web_publication_add_window *window
void on_web_publish_path_changed(GtkWidget *, web_publication_add_window *window){ void on_web_publish_path_changed(GtkWidget *, web_publication_add_window *window){
gtk_list_store_clear(window->list); gtk_list_store_clear(window->list);
char *path = (char*)gtk_entry_get_text(GTK_ENTRY(window->PathEntry)); char *path = (char*)gtk_entry_get_text(GTK_ENTRY(window->PathEntry));
if (!yon_file_is_directory(path)){
return;
}
if (yon_char_is_empty(path) || access(path,F_OK)) return; if (yon_char_is_empty(path) || access(path,F_OK)) return;
int size; int size;
config_str parsed = yon_dir_get_contents(path,&size); config_str parsed = yon_dir_get_contents(path,&size);

Loading…
Cancel
Save