Changed method of touching logfile before using

This commit is contained in:
solusipse
2017-09-02 22:20:08 +02:00
parent c1725790bb
commit 99b45b93f2

View File

@@ -252,7 +252,8 @@ int fiche_run(Fiche_Settings settings) {
if ( settings.log_file_path ) {
// Create log file if it doesn't exist
creat(settings.log_file_path, S_IRWXU);
FILE *f = fopen(settings.log_file_path, "a+");
fclose(f);
// Then check if it's accessible
if ( access(settings.log_file_path, W_OK) != 0 ) {