Removed unnessessary chmod

pull/28/head
parent 3d64db2922
commit be94db8ba0

@ -295,23 +295,9 @@ void yon_terminal_integrated_start_shell(GtkWidget *terminal, char* command, voi
} }
__yon_window_config_file = g_key_file_new(); __yon_window_config_file = g_key_file_new();
__yon_window_config_path=yon_char_new(path); __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,0644);
if (!g_key_file_load_from_file(__yon_window_config_file,__yon_window_config_path,G_KEY_FILE_NONE,NULL)){ if (!g_key_file_load_from_file(__yon_window_config_file,__yon_window_config_path,G_KEY_FILE_NONE,NULL)){
struct stat st; struct stat st;
int size; 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, 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,0644);
fclose(fp);
g_key_file_load_from_file(__yon_window_config_file,__yon_window_config_path,G_KEY_FILE_NONE,NULL); g_key_file_load_from_file(__yon_window_config_file,__yon_window_config_path,G_KEY_FILE_NONE,NULL);
} }
__yon_main_window_config.x = g_key_file_get_integer(__yon_window_config_file,"window","WindowPosX",NULL); __yon_main_window_config.x = g_key_file_get_integer(__yon_window_config_file,"window","WindowPosX",NULL);

Loading…
Cancel
Save