summaryrefslogtreecommitdiffstats
path: root/twrp-functions.cpp
diff options
context:
space:
mode:
authorDees_Troy <dees_troy@teamw.in>2013-02-06 20:13:00 +0100
committerbigbiff bigbiff <bigbiff@teamw.in>2013-02-07 14:21:17 +0100
commite34c133ec6053025124416a3861f9f4c4f7fd772 (patch)
tree027d856cea0aa7abd29234727ef0924683d4d409 /twrp-functions.cpp
parentMerge "Fix misspelling and white space on fix perms" into twrp2.4 (diff)
downloadandroid_bootable_recovery-e34c133ec6053025124416a3861f9f4c4f7fd772.tar
android_bootable_recovery-e34c133ec6053025124416a3861f9f4c4f7fd772.tar.gz
android_bootable_recovery-e34c133ec6053025124416a3861f9f4c4f7fd772.tar.bz2
android_bootable_recovery-e34c133ec6053025124416a3861f9f4c4f7fd772.tar.lz
android_bootable_recovery-e34c133ec6053025124416a3861f9f4c4f7fd772.tar.xz
android_bootable_recovery-e34c133ec6053025124416a3861f9f4c4f7fd772.tar.zst
android_bootable_recovery-e34c133ec6053025124416a3861f9f4c4f7fd772.zip
Diffstat (limited to 'twrp-functions.cpp')
-rw-r--r--twrp-functions.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/twrp-functions.cpp b/twrp-functions.cpp
index f2dcf7c64..fa2110aa0 100644
--- a/twrp-functions.cpp
+++ b/twrp-functions.cpp
@@ -411,7 +411,6 @@ int TWFunc::removeDir(const string path, bool skipParent) {
if (d) {
struct dirent *p;
while (!r && (p = readdir(d))) {
- LOGI("checking :%s\n", p->d_name);
if (!strcmp(p->d_name, ".") || !strcmp(p->d_name, ".."))
continue;
new_path = path + "/";
@@ -426,8 +425,9 @@ int TWFunc::removeDir(const string path, bool skipParent) {
}
} 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());
+ if (r != 0) {
+ LOGI("Unable to unlink '%s: %s'\n", new_path.c_str(), strerror(errno));
+ }
}
}
closedir(d);
@@ -471,4 +471,4 @@ unsigned int TWFunc::Get_D_Type_From_Stat(string Path) {
else if (st.st_mode & S_IFSOCK)
return DT_SOCK;
return DT_UNKNOWN;
-} \ No newline at end of file
+}