[FL-2410] SubGhz: fix launching an incorrect Sub-GHz key from the archive. (#1080)

This commit is contained in:
Skorpionm 2022-04-01 15:10:21 +04:00 committed by GitHub
parent 0bf2702210
commit cb7d43f7e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 18 additions and 13 deletions

View file

@ -309,7 +309,8 @@ int32_t subghz_app(void* p) {
subghz_environment_load_keystore( subghz_environment_load_keystore(
subghz->txrx->environment, "/ext/subghz/assets/keeloq_mfcodes_user"); subghz->txrx->environment, "/ext/subghz/assets/keeloq_mfcodes_user");
// Check argument and run corresponding scene // Check argument and run corresponding scene
if(p && subghz_key_load(subghz, p)) { if(p) {
if(subghz_key_load(subghz, p)) {
string_t filename; string_t filename;
string_init(filename); string_init(filename);
@ -324,6 +325,11 @@ int32_t subghz_app(void* p) {
//Load transmitter TX //Load transmitter TX
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneTransmitter); scene_manager_next_scene(subghz->scene_manager, SubGhzSceneTransmitter);
} }
} else {
//exit app
scene_manager_stop(subghz->scene_manager);
view_dispatcher_stop(subghz->view_dispatcher);
}
} else { } else {
if(load_database) { if(load_database) {
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneStart); scene_manager_next_scene(subghz->scene_manager, SubGhzSceneStart);

View file

@ -277,7 +277,6 @@ bool subghz_key_load(SubGhz* subghz, const char* file_path) {
} }
string_clear(temp_str); string_clear(temp_str);
//string_clear(path);
flipper_format_free(fff_data_file); flipper_format_free(fff_data_file);
furi_record_close("storage"); furi_record_close("storage");