Move desktop config back to int (for pin purposes)

This commit is contained in:
Willy-JL
2023-05-17 01:52:18 +01:00
parent 0a68781ce7
commit ff76fe32c1
5 changed files with 11 additions and 18 deletions
+7 -4
View File
@@ -45,7 +45,7 @@ void flipper_migrate_files() {
storage_common_remove(storage, INT_PATH(".passport.settings"));
storage_common_remove(storage, INT_PATH(".region_data"));
// Migrate files
// Migrate files, Int -> Ext
storage_common_copy(storage, ARCHIVE_FAV_OLD_PATH, ARCHIVE_FAV_PATH);
storage_common_remove(storage, ARCHIVE_FAV_OLD_PATH);
storage_common_copy(storage, BT_SETTINGS_OLD_PATH, BT_SETTINGS_PATH);
@@ -56,13 +56,16 @@ void flipper_migrate_files() {
storage_common_remove(storage, POWER_SETTINGS_OLD_PATH);
storage_common_copy(storage, BT_KEYS_STORAGE_OLD_PATH, BT_KEYS_STORAGE_PATH);
storage_common_remove(storage, BT_KEYS_STORAGE_OLD_PATH);
storage_common_copy(storage, DESKTOP_SETTINGS_OLD_PATH, DESKTOP_SETTINGS_PATH);
storage_common_remove(storage, DESKTOP_SETTINGS_OLD_PATH);
storage_common_copy(storage, NOTIFICATION_SETTINGS_OLD_PATH, NOTIFICATION_SETTINGS_PATH);
storage_common_remove(storage, NOTIFICATION_SETTINGS_OLD_PATH);
// Ext -> Int
storage_common_copy(storage, DESKTOP_SETTINGS_OLD_PATH, DESKTOP_SETTINGS_PATH);
storage_common_remove(storage, DESKTOP_SETTINGS_OLD_PATH);
// Special care for U2F
if(storage_common_exists(storage, U2F_CNT_OLD_FILE)) { // Is on Int
FileInfo file_info;
if(storage_common_stat(storage, U2F_CNT_OLD_FILE, &file_info) == FSE_OK &&
file_info.size > 200) { // Is on Int and has content
storage_common_remove(storage, U2F_CNT_FILE); // Remove outdated on Ext
storage_common_rename(storage, U2F_CNT_OLD_FILE, U2F_CNT_FILE); // Int -> Ext
}