Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/log.c
Original file line number Diff line number Diff line change
Expand Up @@ -80,10 +80,10 @@ bool bs_log_init_file(
}

// Now, actually create it.
int fd = open(path, O_CREAT | O_WRONLY, S_IWUSR | S_IRUSR);
int fd = open(path, O_CREAT|O_WRONLY|O_TRUNC, S_IWUSR|S_IRUSR);
if (0 > fd) {
bs_log(BS_ERROR | BS_ERRNO,
"Failed open(%s, O_CREATE | O_WRONLY, S_IWUSR | S_IRUSR)",
"Failed open(%s, O_CREATE|O_WRONLY|O_TRUNC, S_IWUSR|S_IRUSR)",
path);
return false;
}
Expand Down
Loading