Fixed file creation

pull/41/head
parent 2831fa7a85
commit cddff6c596

@ -2582,10 +2582,11 @@ int yon_file_create_full_path(char *path, int rules){
mkdir(temp,0755); mkdir(temp,0755);
} else { } else {
FILE *fl = fopen(temp,"w"); FILE *fl = fopen(temp,"w");
int chmod_success = chmod(temp,rules); fclose(fl);
} }
struct passwd *user = getpwnam(yon_ubl_root_user_get()); struct passwd *user = getpwnam(yon_ubl_root_user_get());
int chown_success = chown(temp,user->pw_uid,user->pw_gid); int chown_success = chown(temp,user->pw_uid,user->pw_gid);
int chmod_success = chmod(temp,rules);
} }
} }
if (!yon_char_is_empty(current)) free(current); if (!yon_char_is_empty(current)) free(current);

Loading…
Cancel
Save