diff --git a/source/ubinstall-gtk-configuration-mode.c b/source/ubinstall-gtk-configuration-mode.c index a3c8b93..85aba75 100644 --- a/source/ubinstall-gtk-configuration-mode.c +++ b/source/ubinstall-gtk-configuration-mode.c @@ -30,6 +30,8 @@ int yon_configuration_path_check(const char *path){ struct passwd *user = getpwnam(yon_ubl_root_user_get()); if (chown(full_path,user->pw_uid,user->pw_gid)){}; + } else { + return 0; } } main_config.config_load_path = full_path; @@ -45,9 +47,9 @@ void configuration_mode_accept(GtkWidget *,configuration_window *window){ yon_ubl_status_highlight_incorrect(window->PathEntry); return; } - yon_configuration_path_check(path); - - gtk_widget_destroy(window->Window); + if (yon_configuration_path_check(path)){ + gtk_widget_destroy(window->Window); + } } void on_path_choose(GtkWidget *,configuration_window *window){