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
pull/1998/head
Richard Fuchs 5 months ago
parent c066b69df5
commit 00a6119cff

@ -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";

Loading…
Cancel
Save