summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2014-04-16 18:49:02 +0200
committerEthan Yonker <dees_troy@teamw.in>2014-04-16 19:07:45 +0200
commiteeed3c55d82fc19e34fd78a188b4a5367923901b (patch)
tree1f04efc0534b6e6cd1c76715753248665f3c4d9e
parentAdd support for actions triggered by key combination (diff)
downloadandroid_bootable_recovery-eeed3c55d82fc19e34fd78a188b4a5367923901b.tar
android_bootable_recovery-eeed3c55d82fc19e34fd78a188b4a5367923901b.tar.gz
android_bootable_recovery-eeed3c55d82fc19e34fd78a188b4a5367923901b.tar.bz2
android_bootable_recovery-eeed3c55d82fc19e34fd78a188b4a5367923901b.tar.lz
android_bootable_recovery-eeed3c55d82fc19e34fd78a188b4a5367923901b.tar.xz
android_bootable_recovery-eeed3c55d82fc19e34fd78a188b4a5367923901b.tar.zst
android_bootable_recovery-eeed3c55d82fc19e34fd78a188b4a5367923901b.zip
-rw-r--r--data.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/data.cpp b/data.cpp
index 4bf8637a6..7be0b03e8 100644
--- a/data.cpp
+++ b/data.cpp
@@ -279,9 +279,10 @@ int DataManager::LoadValues(const string filename)
error:
fclose(in);
string current = GetCurrentStoragePath();
- string settings = GetSettingsStoragePath();
- if (current != settings && !PartitionManager.Mount_By_Path(current, false)) {
- SetValue("tw_storage_path", settings);
+ TWPartition* Part = PartitionManager.Find_Partition_By_Path(current);
+ if (current != Part->Storage_Path && Part->Mount(false)) {
+ LOGINFO("LoadValues setting storage path to '%s'\n", Part->Storage_Path.c_str());
+ SetValue("tw_storage_path", Part->Storage_Path);
} else {
SetBackupFolder();
}