Set /data/recovery for Settings
* Test: TWRP boots, settings saves, Change TWRP Folder works
Change-Id: Iaae45064815a4adc55e1116f2c51fba869b284b5
Signed-off-by: Mohd Faraz <androiabledroid@gmail.com>
(cherry picked from commit f923110ae01d45f5afb3eccf734d82b9c0b4795e)
diff --git a/data.cpp b/data.cpp
index 07e5c1f..22efb18 100755
--- a/data.cpp
+++ b/data.cpp
@@ -1149,7 +1149,7 @@
memset(mkdir_path, 0, sizeof(mkdir_path));
memset(settings_file, 0, sizeof(settings_file));
- sprintf(mkdir_path, "%s%s", GetSettingsStoragePath().c_str(), GetStrValue(TW_RECOVERY_FOLDER_VAR).c_str());
+ sprintf(mkdir_path, "%s%s", GetSettingsStoragePath().c_str(), GetStrValue(TW_RECOVERY_NAME).c_str());
sprintf(settings_file, "%s/%s", mkdir_path, TW_SETTINGS_FILE);
if (!PartitionManager.Mount_Settings_Storage(false))
@@ -1194,7 +1194,6 @@
void DataManager::LoadTWRPFolderInfo(void)
{
- string mainPath = GetCurrentStoragePath();
SetValue(TW_RECOVERY_FOLDER_VAR, TWFunc::Check_For_TwrpFolder());
- mBackingFile = mainPath + GetStrValue(TW_RECOVERY_FOLDER_VAR) + '/' + TW_SETTINGS_FILE;
+ mBackingFile = GetSettingsStoragePath() + GetStrValue(TW_RECOVERY_NAME) + '/' + TW_SETTINGS_FILE;
}