Added own changing to all file access functions

pull/28/head
parent 3f8ef08ef4
commit 949ea7d73a

@ -293,6 +293,8 @@ void yon_terminal_integrated_start_shell(GtkWidget *terminal, char* command, voi
if (!access(path,0)){ if (!access(path,0)){
__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,0777); chmod(__yon_window_config_path,0777);
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;
@ -304,6 +306,8 @@ void yon_terminal_integrated_start_shell(GtkWidget *terminal, char* command, voi
} }
FILE *fp; FILE *fp;
fp=fopen(__yon_window_config_path,"w"); 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,0777);
fclose(fp); 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);

Loading…
Cancel
Save