diff options
Diffstat (limited to 'twrp-functions.cpp')
-rw-r--r-- | twrp-functions.cpp | 8 |
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 +} |