From 2aae677d0e94bd2824cbe3dab6dc9ac795cae013 Mon Sep 17 00:00:00 2001 From: Ilya Zlobintsev Date: Wed, 19 Aug 2026 17:54:05 +0300 Subject: [PATCH] fix: only create new file when writing debug snapshot --- lact-daemon/src/server/handler.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lact-daemon/src/server/handler.rs b/lact-daemon/src/server/handler.rs index 8a9c7905..fdeaa100 100644 --- a/lact-daemon/src/server/handler.rs +++ b/lact-daemon/src/server/handler.rs @@ -719,7 +719,7 @@ impl<'a> Handler { let datetime = jiff::Zoned::now().strftime("%Y%m%d-%H%M%S"); let out_path = format!("/tmp/LACT-v{DAEMON_VERSION}-snapshot-{datetime}.tar.gz"); - let out_file = File::create(&out_path) + let out_file = File::create_new(&out_path) .with_context(|| "Could not create output file at {out_path}")?; let out_writer = gzip::Encoder::new(BufWriter::new(out_file)) .context("Could not create GZIP encoder")?;