diff options
author | Christian Duerr <contact@christianduerr.com> | 2022-01-22 23:48:44 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-22 22:48:44 +0000 |
commit | 9f6b49ca8fa1a8050d41fe5545009847b8a24f08 (patch) | |
tree | f5148c57316fb56dc0be223b137c4d0d0bd379a4 | |
parent | 4e91e99de33c11a039d9b6479c014941ddb80b56 (diff) | |
download | alacritty-9f6b49ca8fa1a8050d41fe5545009847b8a24f08.tar.gz alacritty-9f6b49ca8fa1a8050d41fe5545009847b8a24f08.zip |
Fix logfile overwriting existing files
-rw-r--r-- | CHANGELOG.md | 1 | ||||
-rw-r--r-- | alacritty/src/logging.rs | 2 |
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index ba0086e4..e7c8e27b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/alacritty/src/logging.rs b/alacritty/src/logging.rs index 3ac40e4b..f3405e58 100644 --- a/alacritty/src/logging.rs +++ b/alacritty/src/logging.rs @@ -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) => { |