From e1c83692c3e9b78777ce28d062770022e9403ae4 Mon Sep 17 00:00:00 2001 From: SkorP Date: Thu, 17 Aug 2023 16:48:37 +0400 Subject: [PATCH] [FL-3552] Sub-GHz: Check saved file --- applications/main/subghz/subghz_i.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/applications/main/subghz/subghz_i.c b/applications/main/subghz/subghz_i.c index a6cfe9025..0dbeaa10d 100644 --- a/applications/main/subghz/subghz_i.c +++ b/applications/main/subghz/subghz_i.c @@ -309,10 +309,14 @@ bool subghz_save_protocol_to_file( if(!storage_simply_remove(storage, dev_file_name)) { break; } - //ToDo check Write + stream_seek(flipper_format_stream, 0, StreamOffsetFromStart); stream_save_to_file(flipper_format_stream, storage, dev_file_name, FSOM_CREATE_ALWAYS); + if(storage_common_stat(storage, dev_file_name, NULL) != FSE_OK) { + break; + } + saved = true; } while(0); furi_string_free(file_dir);