summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbigbiff bigbiff <bigbiff@teamw.in>2013-01-20 00:46:13 +0100
committerbigbiff bigbiff <bigbiff@teamw.in>2013-01-20 00:46:13 +0100
commit98f1f903cceee4a0c7a3693c6bd93825210cdf96 (patch)
tree4a52777ca8fea17ded2f2a26fba9630f8c76006c
parentFix handling of blkid output (diff)
downloadandroid_bootable_recovery-98f1f903cceee4a0c7a3693c6bd93825210cdf96.tar
android_bootable_recovery-98f1f903cceee4a0c7a3693c6bd93825210cdf96.tar.gz
android_bootable_recovery-98f1f903cceee4a0c7a3693c6bd93825210cdf96.tar.bz2
android_bootable_recovery-98f1f903cceee4a0c7a3693c6bd93825210cdf96.tar.lz
android_bootable_recovery-98f1f903cceee4a0c7a3693c6bd93825210cdf96.tar.xz
android_bootable_recovery-98f1f903cceee4a0c7a3693c6bd93825210cdf96.tar.zst
android_bootable_recovery-98f1f903cceee4a0c7a3693c6bd93825210cdf96.zip
-rw-r--r--partition.cpp2
-rw-r--r--twrp-functions.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/partition.cpp b/partition.cpp
index 291f6baa5..d16ed7c74 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -1234,7 +1234,7 @@ bool TWPartition::Wipe_Data_Without_Wiping_Media() {
dir.append(de->d_name);
if (de->d_type == DT_DIR) {
TWFunc::removeDir(dir, false);
- } else if (de->d_type == DT_REG || de->d_type == DT_LNK) {
+ } else if (de->d_type == DT_REG || de->d_type == DT_LNK || de->d_type == DT_FIFO || de->d_type == DT_SOCK) {
if (!unlink(dir.c_str()))
LOGI("Unable to unlink '%s'\n", dir.c_str());
}
diff --git a/twrp-functions.cpp b/twrp-functions.cpp
index d7596b8a0..edf4898b1 100644
--- a/twrp-functions.cpp
+++ b/twrp-functions.cpp
@@ -426,7 +426,7 @@ int TWFunc::removeDir(const string path, bool skipParent) {
else
LOGI("Unable to removeDir '%s': %s\n", new_path.c_str(), strerror(errno));
}
- } else if (p->d_type == DT_REG || p->d_type == DT_LNK) {
+ } else if (p->d_type == DT_REG || p->d_type == DT_LNK || p->d_type == DT_FIFO || p->d_type == DT_SOCK) {
r = unlink(new_path.c_str());
if (!r)
LOGI("Unable to unlink '%s'\n", new_path.c_str());