|
|
|
|
@ -26,9 +26,17 @@ int yon_configuration_path_check(const char *path){
|
|
|
|
|
data->action_text = homedir_create?CREATE_CONFIG_DIALOG_LABEL_HOMEDIR:CREATE_CONFIG_DIALOG_LABEL;
|
|
|
|
|
data->title = WARNING_TITLE_LABEL;
|
|
|
|
|
if (yon_confirmation_dialog_call(NULL,data)==GTK_RESPONSE_ACCEPT){
|
|
|
|
|
char *dir_path = yon_file_get_parent(full_path);
|
|
|
|
|
if (access(full_path,F_OK)&&(access(dir_path,W_OK)||access(dir_path,R_OK))){
|
|
|
|
|
if (system(ubconfig_file_create_pkexec(full_path))){
|
|
|
|
|
return 0;
|
|
|
|
|
}
|
|
|
|
|
} else if (access(full_path,F_OK)){
|
|
|
|
|
yon_launch(ubconfig_file_create(full_path));
|
|
|
|
|
struct passwd *user = getpwnam(yon_ubl_root_user_get());
|
|
|
|
|
if (chown(full_path,user->pw_uid,user->pw_gid)){};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
return 0;
|
|
|
|
|
|