[FL-2229] New assets paths (#978)
* assets: change resources paths * apps: rework nfc, irda and subghz with new assets path * subghz: remove unused paths * subghz: fix incorrect path * badusb and u2f fix Co-authored-by: あく <alleteam@gmail.com> Co-authored-by: nminaylov <nm29719@gmail.com>
This commit is contained in:
@@ -15,9 +15,7 @@
|
||||
#define DURATION_DIFF(x, y) ((x < y) ? (y - x) : (x - y))
|
||||
|
||||
#define SUBGHZ_APP_FOLDER "/any/subghz"
|
||||
#define SUBGHZ_APP_PATH_FOLDER "/any/subghz/saved"
|
||||
#define SUBGHZ_RAW_FOLDER "/ext/subghz"
|
||||
#define SUBGHZ_RAW_PATH_FOLDER "/ext/subghz/saved"
|
||||
#define SUBGHZ_APP_EXTENSION ".sub"
|
||||
#define SUBGHZ_ENCODER_UPLOAD_MAX_SIZE 2048
|
||||
|
||||
|
7
lib/subghz/protocols/subghz_protocol_raw.c
Normal file → Executable file
7
lib/subghz/protocols/subghz_protocol_raw.c
Normal file → Executable file
@@ -176,15 +176,10 @@ bool subghz_protocol_raw_save_to_file_init(
|
||||
if(!storage_simply_mkdir(instance->storage, SUBGHZ_RAW_FOLDER)) {
|
||||
break;
|
||||
}
|
||||
// Create saved directory if necessary
|
||||
if(!storage_simply_mkdir(instance->storage, SUBGHZ_RAW_PATH_FOLDER)) {
|
||||
break;
|
||||
}
|
||||
|
||||
string_set(instance->file_name, dev_name);
|
||||
// First remove subghz device file if it was saved
|
||||
string_printf(
|
||||
dev_file_name, "%s/%s%s", SUBGHZ_APP_PATH_FOLDER, dev_name, SUBGHZ_APP_EXTENSION);
|
||||
string_printf(dev_file_name, "%s/%s%s", SUBGHZ_RAW_FOLDER, dev_name, SUBGHZ_APP_EXTENSION);
|
||||
|
||||
if(!storage_simply_remove(instance->storage, string_get_cstr(dev_file_name))) {
|
||||
break;
|
||||
|
Reference in New Issue
Block a user