|
|
|
|
@ -291,26 +291,26 @@ void yon_terminal_integrated_start_shell(GtkWidget *terminal, char* command, voi
|
|
|
|
|
int yon_window_config_load(char *path){
|
|
|
|
|
if(__yon_window_config_target_window){
|
|
|
|
|
if (access(path,0)){
|
|
|
|
|
yon_file_create_full_path(path,0777);
|
|
|
|
|
yon_file_create_full_path(path,0644);
|
|
|
|
|
}
|
|
|
|
|
__yon_window_config_file = g_key_file_new();
|
|
|
|
|
__yon_window_config_path=yon_char_new(path);
|
|
|
|
|
struct passwd *user = getpwnam(yon_ubl_root_user_get());
|
|
|
|
|
chown(__yon_window_config_path,user->pw_uid,user->pw_gid);
|
|
|
|
|
chmod(__yon_window_config_path,0777);
|
|
|
|
|
chmod(__yon_window_config_path,0644);
|
|
|
|
|
if (!g_key_file_load_from_file(__yon_window_config_file,__yon_window_config_path,G_KEY_FILE_NONE,NULL)){
|
|
|
|
|
struct stat st;
|
|
|
|
|
int size;
|
|
|
|
|
config_str conf = yon_char_parse(yon_char_new(__yon_window_config_path),&size,"/");
|
|
|
|
|
char *path = yon_char_unite(conf[0],"/",conf[1],"/",conf[2],"/",conf[3],"/",conf[4],"/",NULL);
|
|
|
|
|
if (stat(path, &st) == -1) {
|
|
|
|
|
mkdir(path, 0777);
|
|
|
|
|
mkdir(path, 0644);
|
|
|
|
|
}
|
|
|
|
|
FILE *fp;
|
|
|
|
|
fp=fopen(__yon_window_config_path,"w");
|
|
|
|
|
struct passwd *user = getpwnam(yon_ubl_root_user_get());
|
|
|
|
|
chown(__yon_window_config_path,user->pw_uid,user->pw_gid);
|
|
|
|
|
chmod(__yon_window_config_path,0777);
|
|
|
|
|
chmod(__yon_window_config_path,0644);
|
|
|
|
|
fclose(fp);
|
|
|
|
|
g_key_file_load_from_file(__yon_window_config_file,__yon_window_config_path,G_KEY_FILE_NONE,NULL);
|
|
|
|
|
}
|
|
|
|
|
|