summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Duerr <contact@christianduerr.com>2022-01-22 23:48:44 +0100
committerChristian Duerr <contact@christianduerr.com>2022-01-23 11:33:20 +0100
commite05dc3ad4aed052c92501f4473c9b4af0bfd2ebf (patch)
treeb0fbce352865be1a21f4799fd78341f75f12844d
parent6549303e0e03bfaccda23c7e2d4c7a53482901fa (diff)
downloadalacritty-e05dc3ad4aed052c92501f4473c9b4af0bfd2ebf.tar.gz
alacritty-e05dc3ad4aed052c92501f4473c9b4af0bfd2ebf.zip
Fix logfile overwriting existing files
-rw-r--r--CHANGELOG.md1
-rw-r--r--alacritty/src/logging.rs2
2 files changed, 2 insertions, 1 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index bffa6770..3ca4ba9f 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -41,6 +41,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) => {