Fixed config creating cancel

pull/239/head
parent d8b3699d7a
commit 6dc506e5db

@ -30,6 +30,8 @@ int yon_configuration_path_check(const char *path){
struct passwd *user = getpwnam(yon_ubl_root_user_get()); struct passwd *user = getpwnam(yon_ubl_root_user_get());
if (chown(full_path,user->pw_uid,user->pw_gid)){}; if (chown(full_path,user->pw_uid,user->pw_gid)){};
} else {
return 0;
} }
} }
main_config.config_load_path = full_path; main_config.config_load_path = full_path;
@ -45,10 +47,10 @@ void configuration_mode_accept(GtkWidget *,configuration_window *window){
yon_ubl_status_highlight_incorrect(window->PathEntry); yon_ubl_status_highlight_incorrect(window->PathEntry);
return; return;
} }
yon_configuration_path_check(path); if (yon_configuration_path_check(path)){
gtk_widget_destroy(window->Window); gtk_widget_destroy(window->Window);
} }
}
void on_path_choose(GtkWidget *,configuration_window *window){ void on_path_choose(GtkWidget *,configuration_window *window){
filechooser_window *dialog = yon_config_file_chooser_window_new(GTK_FILE_CHOOSER_ACTION_SAVE); filechooser_window *dialog = yon_config_file_chooser_window_new(GTK_FILE_CHOOSER_ACTION_SAVE);

Loading…
Cancel
Save