mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-08 23:08:10 -07:00
testing something new
This commit is contained in:
@@ -23,6 +23,10 @@ static const char* app_dirsDolphinBackup[] = {
|
||||
".notification.settings",
|
||||
".bt.keys",
|
||||
".power.settings",
|
||||
"dolphin/manifest.txt",
|
||||
"dolphin/name.txt",
|
||||
"subghz/assets/extend_range.txt",
|
||||
"subghz/assets/setting_user.txt",
|
||||
};
|
||||
|
||||
bool storage_DolphinBackup_perform(void) {
|
||||
@@ -38,7 +42,14 @@ bool storage_DolphinBackup_perform(void) {
|
||||
storage_common_mkdir(storage, furi_string_get_cstr(new_path));
|
||||
furi_string_free(new_path);
|
||||
for(uint32_t i = 0; i < COUNT_OF(app_dirsDolphinBackup); i++) {
|
||||
if(i > 5) {
|
||||
if(i > 11) {
|
||||
furi_string_printf(path_src, "%s/%s", MOVE_DST, app_dirsDolphinBackup[i]);
|
||||
furi_string_printf(
|
||||
path_dst, "%s/dolphin_restorer/%s", MOVE_DST, app_dirsDolphinBackup[i]);
|
||||
storage_simply_remove_recursive(storage, furi_string_get_cstr(path_dst));
|
||||
storage_common_copy(
|
||||
storage, furi_string_get_cstr(path_src), furi_string_get_cstr(path_dst));
|
||||
} else if(i > 5) {
|
||||
furi_string_printf(path_src, "%s/%s", MOVE_SRC, app_dirsDolphinBackup[i]);
|
||||
furi_string_printf(
|
||||
path_dst, "%s/dolphin_restorer/%s", MOVE_DST, app_dirsDolphinBackup[i]);
|
||||
|
||||
@@ -17,6 +17,10 @@ static const char* app_dirs[] = {
|
||||
".notification.settings",
|
||||
".bt.keys",
|
||||
".power.settings",
|
||||
"dolphin/manifest.txt",
|
||||
"dolphin/name.txt",
|
||||
"subghz/assets/extend_range.txt",
|
||||
"subghz/assets/setting_user.txt",
|
||||
};
|
||||
|
||||
bool drestorer_perform(void) {
|
||||
@@ -27,11 +31,19 @@ bool drestorer_perform(void) {
|
||||
path_dst = furi_string_alloc();
|
||||
|
||||
for(uint32_t i = 0; i < COUNT_OF(app_dirs); i++) {
|
||||
furi_string_printf(path_src, "%s/%s", MOVE_SRC, app_dirs[i]);
|
||||
furi_string_printf(path_dst, "%s/%s", MOVE_DST, app_dirs[i]);
|
||||
storage_simply_remove_recursive(storage, furi_string_get_cstr(path_dst));
|
||||
storage_common_copy(
|
||||
storage, furi_string_get_cstr(path_src), furi_string_get_cstr(path_dst));
|
||||
if(i>5) {
|
||||
furi_string_printf(path_src, "%s/%s", MOVE_DST, app_dirs[i]);
|
||||
furi_string_printf(path_dst, "%s/%s", MOVE_DST, app_dirs[i]);
|
||||
storage_simply_remove_recursive(storage, furi_string_get_cstr(path_dst));
|
||||
storage_common_copy(
|
||||
storage, furi_string_get_cstr(path_src), furi_string_get_cstr(path_dst));
|
||||
} else {
|
||||
furi_string_printf(path_src, "%s/%s", MOVE_SRC, app_dirs[i]);
|
||||
furi_string_printf(path_dst, "%s/%s", MOVE_DST, app_dirs[i]);
|
||||
storage_simply_remove_recursive(storage, furi_string_get_cstr(path_dst));
|
||||
storage_common_copy(
|
||||
storage, furi_string_get_cstr(path_src), furi_string_get_cstr(path_dst));
|
||||
}
|
||||
}
|
||||
|
||||
furi_string_free(path_src);
|
||||
|
||||
Reference in New Issue
Block a user