summaryrefslogtreecommitdiffstats
path: root/partitionmanager.cpp
diff options
context:
space:
mode:
authorEthan Yonker <dees_troy@teamw.in>2016-12-10 16:04:41 +0100
committerDees Troy <dees_troy@teamw.in>2016-12-13 21:26:57 +0100
commitff2b7881c96c81d510481b92982d099e9101dbec (patch)
tree756d577a0784f8b6caa4b1f2e8f54daaa57dfdf6 /partitionmanager.cpp
parentSupport backup/restore of FBE policies (diff)
downloadandroid_bootable_recovery-ff2b7881c96c81d510481b92982d099e9101dbec.tar
android_bootable_recovery-ff2b7881c96c81d510481b92982d099e9101dbec.tar.gz
android_bootable_recovery-ff2b7881c96c81d510481b92982d099e9101dbec.tar.bz2
android_bootable_recovery-ff2b7881c96c81d510481b92982d099e9101dbec.tar.lz
android_bootable_recovery-ff2b7881c96c81d510481b92982d099e9101dbec.tar.xz
android_bootable_recovery-ff2b7881c96c81d510481b92982d099e9101dbec.tar.zst
android_bootable_recovery-ff2b7881c96c81d510481b92982d099e9101dbec.zip
Diffstat (limited to 'partitionmanager.cpp')
-rw-r--r--partitionmanager.cpp26
1 files changed, 13 insertions, 13 deletions
diff --git a/partitionmanager.cpp b/partitionmanager.cpp
index 26f48d844..40e08634a 100644
--- a/partitionmanager.cpp
+++ b/partitionmanager.cpp
@@ -1237,26 +1237,26 @@ int TWPartitionManager::Wipe_Dalvik_Cache(void) {
if (!Mount_By_Path("/data", true))
return false;
- if (!Mount_By_Path("/cache", true))
- return false;
-
dir.push_back("/data/dalvik-cache");
- dir.push_back("/cache/dalvik-cache");
- dir.push_back("/cache/dc");
- gui_msg("wiping_dalvik=Wiping Dalvik Cache Directories...");
- for (unsigned i = 0; i < dir.size(); ++i) {
- if (stat(dir.at(i).c_str(), &st) == 0) {
- TWFunc::removeDir(dir.at(i), false);
- gui_msg(Msg("cleaned=Cleaned: {1}...")(dir.at(i)));
- }
+ if (Mount_By_Path("/cache", false)) {
+ dir.push_back("/cache/dalvik-cache");
+ dir.push_back("/cache/dc");
}
+
TWPartition* sdext = Find_Partition_By_Path("/sd-ext");
if (sdext && sdext->Is_Present && sdext->Mount(false))
{
if (stat("/sd-ext/dalvik-cache", &st) == 0)
{
- TWFunc::removeDir("/sd-ext/dalvik-cache", false);
- gui_msg(Msg("cleaned=Cleaned: {1}...")("/sd-ext/dalvik-cache"));
+ dir.push_back("/sd-ext/dalvik-cache");
+ }
+ }
+
+ gui_msg("wiping_dalvik=Wiping Dalvik Cache Directories...");
+ for (unsigned i = 0; i < dir.size(); ++i) {
+ if (stat(dir.at(i).c_str(), &st) == 0) {
+ TWFunc::removeDir(dir.at(i), false);
+ gui_msg(Msg("cleaned=Cleaned: {1}...")(dir.at(i)));
}
}
gui_msg("dalvik_done=-- Dalvik Cache Directories Wipe Complete!");