From 00a6119cffa9d6dc1f39ceea4cf80a8ca8ad2ae9 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Fri, 15 Aug 2025 13:59:03 -0400 Subject: [PATCH] MT#61977 reverse logic for file open mode Use write-only mode only if file storage and no other storage is enabled. Use read/write for all other cases. Change-Id: I3eea79d8a572b3985015b48cda227ab2b8d9e978 --- recording-daemon/output.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recording-daemon/output.c b/recording-daemon/output.c index a326b9bd5..a93c71b17 100644 --- a/recording-daemon/output.c +++ b/recording-daemon/output.c @@ -384,7 +384,7 @@ static const char *output_open_file(output_t *output) { if (output->fp) fclose(output->fp); - output->fp = fopen(full_fn, (output_storage & OUTPUT_STORAGE_DB) ? "wb+" : "wb"); + output->fp = fopen(full_fn, (output_storage == OUTPUT_STORAGE_FILE) ? "wb" : "wb+"); if (!output->fp) return "failed to open output file";