From aae2db567cbe8274e5e021ee632844ce8ee07a02 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6nig?= Date: Sun, 31 Mar 2024 12:02:12 +0000 Subject: [PATCH] Explicite truncate when file is created MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König --- .devcontainer/Dockerfile | 2 +- playback/src/audio_backend/pipe.rs | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/.devcontainer/Dockerfile b/.devcontainer/Dockerfile index 31a4f0def..a88d49ae4 100644 --- a/.devcontainer/Dockerfile +++ b/.devcontainer/Dockerfile @@ -1,6 +1,6 @@ # syntax=docker/dockerfile:1 ARG debian_version=slim-bookworm -ARG rust_version=1.71.0 +ARG rust_version=1.70.0 FROM rust:${rust_version}-${debian_version} ARG DEBIAN_FRONTEND=noninteractive diff --git a/playback/src/audio_backend/pipe.rs b/playback/src/audio_backend/pipe.rs index e0e8a77c3..e680256d3 100644 --- a/playback/src/audio_backend/pipe.rs +++ b/playback/src/audio_backend/pipe.rs @@ -66,6 +66,7 @@ impl Sink for StdoutSink { OpenOptions::new() .write(true) .create(true) + .truncate(true) .open(file) .map_err(|e| StdoutError::OpenFailure { file: file.to_string(),