BadUSB and Archive fixes (#2005)

* BsdUsb: fix empty lines handling
* Archive: folders and unknown files rename fix

Co-authored-by: あく <alleteam@gmail.com>
This commit is contained in:
Nikolay Minaylov
2022-11-12 14:55:42 +03:00
committed by GitHub
parent f9730bcafe
commit 73441af9c6
5 changed files with 11 additions and 12 deletions

View File

@@ -57,9 +57,11 @@ bool archive_scene_rename_on_event(void* context, SceneManagerEvent event) {
ArchiveFile_t* file = archive_get_current_file(archive->browser);
FuriString* path_dst;
path_dst = furi_string_alloc();
path_extract_dirname(path_src, path_dst);
furi_string_cat_printf(path_dst, "/%s%s", archive->text_store, known_ext[file->type]);
furi_string_cat_printf(
path_dst, "/%s%s", archive->text_store, archive->file_extension);
storage_common_rename(fs_api, path_src, furi_string_get_cstr(path_dst));
furi_record_close(RECORD_STORAGE);