Skip to content

Commit

Permalink
Fix logfile overwriting existing files
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisduerr authored Jan 22, 2022
1 parent 4e91e99 commit 9f6b49c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
- Vi cursor on topmost of the display moving downward when scrolled into history with active output
- Input lag on Wayland with Nvidia binary driver
- Crash when hovering the mouse over fullwidth characters
- Do not create logfile if the file already exists

### Removed

Expand Down
2 changes: 1 addition & 1 deletion alacritty/src/logging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ impl OnDemandLogFile {

// Create the file if it doesn't exist yet.
if self.file.is_none() {
let file = OpenOptions::new().append(true).create(true).open(&self.path);
let file = OpenOptions::new().append(true).create_new(true).open(&self.path);

match file {
Ok(file) => {
Expand Down

0 comments on commit 9f6b49c

Please sign in to comment.