recovery settings saved after format data
After format data, the settings were not being saved on devices with the "TW_INCLUDE_CRYPTO" flag, so I returned the line to the previous path and included a condition to execute the other line only when the flag is not set.
Change-Id: I05461f9dfd5a21c7353e80dc464902603517ac3d
Signed-off-by: Fernando Oliveira <fernandoaju78@gmail.com>
diff --git a/partition.cpp b/partition.cpp
index 3f27d12..d4a4532 100755
--- a/partition.cpp
+++ b/partition.cpp
@@ -1275,7 +1275,9 @@
Storage_Path = Mount_Point + "/media/0";
Symlink_Path = Storage_Path;
DataManager::SetValue(TW_INTERNAL_PATH, Mount_Point + "/media/0");
- DataManager::SetValue("tw_settings_path", TW_STORAGE_PATH);
+ #ifndef TW_INCLUDE_CRYPTO
+ DataManager::SetValue("tw_settings_path", TW_STORAGE_PATH);
+ #endif
UnMount(true);
}
DataManager::SetValue("tw_has_internal", 1);
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 1c3c31b..c8233e4 100755
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -3175,6 +3175,7 @@
}
}
+ DataManager::SetValue("tw_settings_path", TW_STORAGE_PATH);
LOGINFO("Decrypt adopted storage starting\n");
char* xmlFile = PageManager::LoadFileToBuffer(path, NULL);
xml_document<> *doc = NULL;