mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-13 12:18:35 -07:00
enable delete temp files
This commit is contained in:
@@ -77,14 +77,14 @@ bool subghz_history_clear_dir_or_create(SubGhzHistory* instance, bool only_remov
|
|||||||
storage_common_stat(instance->storage, SUBGHZ_HISTORY_TMP_DIR, &fileinfo);
|
storage_common_stat(instance->storage, SUBGHZ_HISTORY_TMP_DIR, &fileinfo);
|
||||||
|
|
||||||
// This is temp
|
// This is temp
|
||||||
bool res = instance->write_tmp_files = true;
|
bool res = false; //instance->write_tmp_files = true;
|
||||||
|
|
||||||
// Uncomment it
|
// Uncomment it
|
||||||
// if(fileinfo.flags & FSF_DIRECTORY) {
|
if(fileinfo.flags & FSF_DIRECTORY) {
|
||||||
// res = storage_simply_remove_recursive(instance->storage, SUBGHZ_HISTORY_TMP_DIR);
|
res = storage_simply_remove_recursive(instance->storage, SUBGHZ_HISTORY_TMP_DIR);
|
||||||
// } else {
|
} else {
|
||||||
// res = (storage_common_remove(instance->storage, SUBGHZ_HISTORY_TMP_DIR) == FSE_OK);
|
res = (storage_common_remove(instance->storage, SUBGHZ_HISTORY_TMP_DIR) == FSE_OK);
|
||||||
// }
|
}
|
||||||
|
|
||||||
#if FURI_DEBUG
|
#if FURI_DEBUG
|
||||||
FURI_LOG_D(TAG, "storage_common_remove done: %s", res ? "true" : "false");
|
FURI_LOG_D(TAG, "storage_common_remove done: %s", res ? "true" : "false");
|
||||||
@@ -93,13 +93,13 @@ bool subghz_history_clear_dir_or_create(SubGhzHistory* instance, bool only_remov
|
|||||||
|
|
||||||
// Uncomment it
|
// Uncomment it
|
||||||
// Stage 2 - create dir
|
// Stage 2 - create dir
|
||||||
// if(!only_remove_dir && res) {
|
if(!only_remove_dir && res) {
|
||||||
// res = storage_simply_mkdir(instance->storage, SUBGHZ_HISTORY_TMP_DIR);
|
res = storage_simply_mkdir(instance->storage, SUBGHZ_HISTORY_TMP_DIR);
|
||||||
// #if FURI_DEBUG
|
#if FURI_DEBUG
|
||||||
// FURI_LOG_D(TAG, "storage_simply_mkdir done: %s", res ? "true" : "false");
|
FURI_LOG_D(TAG, "storage_simply_mkdir done: %s", res ? "true" : "false");
|
||||||
// furi_delay_ms(LOG_DELAY);
|
furi_delay_ms(LOG_DELAY);
|
||||||
// #endif
|
#endif
|
||||||
// }
|
}
|
||||||
|
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user