summaryrefslogtreecommitdiffstats
path: root/partition.cpp
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2012-09-28 18:34:33 +0200
committerDees_Troy <dees_troy@teamw.in>2012-09-28 18:34:33 +0200
commitce2fe779c028eeb198120b6d43e0a242a7113465 (patch)
treea41219ba7992552a06d55f8107a5192b974225d4 /partition.cpp
parentSave version number to storage (diff)
downloadandroid_bootable_recovery-ce2fe779c028eeb198120b6d43e0a242a7113465.tar
android_bootable_recovery-ce2fe779c028eeb198120b6d43e0a242a7113465.tar.gz
android_bootable_recovery-ce2fe779c028eeb198120b6d43e0a242a7113465.tar.bz2
android_bootable_recovery-ce2fe779c028eeb198120b6d43e0a242a7113465.tar.lz
android_bootable_recovery-ce2fe779c028eeb198120b6d43e0a242a7113465.tar.xz
android_bootable_recovery-ce2fe779c028eeb198120b6d43e0a242a7113465.tar.zst
android_bootable_recovery-ce2fe779c028eeb198120b6d43e0a242a7113465.zip
Diffstat (limited to 'partition.cpp')
-rw-r--r--partition.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/partition.cpp b/partition.cpp
index 633011ba6..3ef206a80 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -209,9 +209,10 @@ bool TWPartition::Process_Fstab_Line(string Line, bool Display_Error) {
Display_Name = "Cache";
Wipe_Available_in_GUI = true;
Wipe_During_Factory_Reset = true;
- if (!TWFunc::Path_Exists("/cache/recovery")) {
+ if (Mount(false) && !TWFunc::Path_Exists("/cache/recovery/.")) {
+ string Recreate_Command = "cd /cache && mkdir recovery";
LOGI("Recreating /cache/recovery folder.\n");
- TWFunc::Recursive_Mkdir("/cache/recovery");
+ system(Recreate_Command.c_str());
}
} else if (Mount_Point == "/datadata") {
Wipe_During_Factory_Reset = true;
@@ -1373,9 +1374,10 @@ void TWPartition::Recreate_AndSec_Folder(void) {
LOGE("Unable to recreate android secure folder.\n");
} else if (!TWFunc::Path_Exists(Symlink_Path)) {
LOGI("Recreating android secure folder.\n");
- TWFunc::Recursive_Mkdir(Symlink_Path);
Command = "umount " + Symlink_Mount_Point;
system(Command.c_str());
+ Command = "cd " + Mount_Point + " && mkdir .android_secure";
+ system(Command.c_str());
Command = "mount " + Symlink_Path + " " + Symlink_Mount_Point;
system(Command.c_str());
}