mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-07-02 22:18:56 -07:00
Move desktop config back to int (for pin purposes)
This commit is contained in:
+7
-4
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user