Fixed home folder saving

pull/133/head
parent 6f79008b1f
commit db8e1fab03

@ -1623,6 +1623,8 @@ void on_user_save(GtkWidget *self, dictionary *dict){
day=yon_char_append("0",day); day=yon_char_append("0",day);
} }
password_changed_date = yon_char_unite(yon_char_from_int(1900+tm.tm_year),"-",month,"-",day,NULL); password_changed_date = yon_char_unite(yon_char_from_int(1900+tm.tm_year),"-",month,"-",day,NULL);
} else {
password_changed_date = (char*)gtk_entry_get_text(GTK_ENTRY(window->userPasswordChangedEntry));
} }
int force_at_next_login_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userForceChangeCheck)); int force_at_next_login_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userForceChangeCheck));
@ -1815,7 +1817,10 @@ void on_parameter_changed(GtkWidget *self,ubl_settings_usergroups_user_window *w
int user_home_active = gtk_combo_box_get_active(GTK_COMBO_BOX(window->userHomeCombo)); int user_home_active = gtk_combo_box_get_active(GTK_COMBO_BOX(window->userHomeCombo));
if (user_home_active==2){ if (user_home_active==2){
user_home=yon_char_unite("--home-dir ",(char*)gtk_entry_get_text(GTK_ENTRY(window->userHomeEntry)),NULL); char *path = (char*)gtk_entry_get_text(GTK_ENTRY(window->userHomeEntry));
if (!yon_char_is_empty(path))
user_home=yon_char_unite("--home-dir ",path,NULL);
else user_home = "";
} else if (user_home_active==1){ } else if (user_home_active==1){
user_home="--no-create-home"; user_home="--no-create-home";
} else user_home = ""; } else user_home = "";
@ -1837,7 +1842,7 @@ void on_parameter_changed(GtkWidget *self,ubl_settings_usergroups_user_window *w
main_group = ""; main_group = "";
} }
char *final_string = user_home; char *final_string = user_home;
final_string = yon_char_unite(!yon_char_is_empty(final_string)?" ":"", final_string = yon_char_unite(user_home,!yon_char_is_empty(final_string)?" ":"",
yon_char_return_if_exist(user_shell,""), yon_char_return_if_exist(user_shell,""),
!yon_char_is_empty(user_shell)?" ":"", !yon_char_is_empty(user_shell)?" ":"",
yon_char_return_if_exist(create_system_user,""), yon_char_return_if_exist(create_system_user,""),

Loading…
Cancel
Save