From e34c133ec6053025124416a3861f9f4c4f7fd772 Mon Sep 17 00:00:00 2001 From: Dees_Troy Date: Wed, 6 Feb 2013 19:13:00 +0000 Subject: Add write buffer for tar writes update fuse to 2.9.2 catch return from unlink so that we don't print error messages when things work Change-Id: I1115039a0fa5d9d73f78ef1abd79755d7ffd9d96 --- twrp-functions.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'twrp-functions.cpp') 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 +} -- cgit v1.2.3