mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2026-11-03 12:50:31 -06:00
fix: only create new file when writing debug snapshot
This commit is contained in:
1 parent
d0478fe42c
commit
2aae677d0e
1 file changed
+1
-1
@@ -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")?;
|
||||
|
||||
Reference in new issue
Block a user