Simplify twrpTar skip dir checks, DU code cleanup

* Remove unused parent variable from twruDU constructor

* Replace manual checks for /data/media with DU's check_skip_dirs()
  function

* Remove check_skip_dirs(A,B) function which duplicates the
  functionality of check_skip_dirs(A)

* Remove redundant trailing slash removal from
  check_absolute_skip_dirs(); this function is only accessed through
  check_skip_dirs()

Change-Id: Icfe8d71de36e33db6749fc5896dd3eafbcf7c9a4
diff --git a/twrpDU.cpp b/twrpDU.cpp
index 38eb4e0..28c3dfa 100644
--- a/twrpDU.cpp
+++ b/twrpDU.cpp
@@ -41,7 +41,6 @@
 #ifdef RECOVERY_SDCARD_ON_DATA
 		add_absolute_dir("/data/media");
 #endif
-		parent = "";
 }
 
 void twrpDU::add_relative_dir(const string& dir) {
@@ -80,7 +79,7 @@
 	}
 
 	while ((de = readdir(d)) != NULL) {
-		if (de->d_type == DT_DIR && !check_skip_dirs(Path, de->d_name)) {
+		if (de->d_type == DT_DIR && !check_skip_dirs(Path + "/" + de->d_name)) {
 			dusize += Get_Folder_Size(Path + "/" + de->d_name);
 		} else if (de->d_type == DT_REG) {
 			stat((Path + "/" + de->d_name).c_str(), &st);
@@ -96,12 +95,7 @@
 }
 
 bool twrpDU::check_absolute_skip_dirs(const string& path) {
-	string normalized = TWFunc::Remove_Trailing_Slashes(path);
-	return std::find(absolutedir.begin(), absolutedir.end(), normalized) != absolutedir.end();
-}
-
-bool twrpDU::check_skip_dirs(const string& parent, const string& dir) {
-	return check_relative_skip_dirs(dir) || check_absolute_skip_dirs(parent + "/" + dir);
+	return std::find(absolutedir.begin(), absolutedir.end(), path) != absolutedir.end();
 }
 
 bool twrpDU::check_skip_dirs(const string& path) {