[FL-2216, FL-2233] Archive fixes (#987)

* archive: badusb, u2f and various fixes
* archive: delete confirmation
* badusb: removed empty string check
* string pointer check
* FuriHal: insomnia overflow assert, fix double insomnia exit in ble. BadUsb: fix uncommitted model.
* view update fixes in gpio, badusb, u2f

Co-authored-by: Aleksandr Kutuzov <alleteam@gmail.com>
This commit is contained in:
Nikolay Minaylov
2022-02-10 16:01:49 +03:00
committed by GitHub
parent df2d1ad13f
commit 2a52d2d620
28 changed files with 431 additions and 117 deletions

View File

@@ -52,7 +52,8 @@ bool archive_scene_rename_on_event(void* context, SceneManagerEvent event) {
const char* path = archive_get_path(archive->browser);
const char* name = archive_get_name(archive->browser);
string_init_printf(buffer_src, "%s/%s", path, name);
string_init_printf(buffer_src, "%s", name);
//TODO: take path from src name
string_init_printf(buffer_dst, "%s/%s", path, archive->text_store);
// append extension
@@ -64,7 +65,7 @@ bool archive_scene_rename_on_event(void* context, SceneManagerEvent event) {
furi_record_close("storage");
if(file->fav) {
archive_favorites_rename(path, name, string_get_cstr(buffer_dst));
archive_favorites_rename(name, string_get_cstr(buffer_dst));
}
string_clear(buffer_src);