summaryrefslogtreecommitdiffstats
path: root/twrpTar.cpp
diff options
context:
space:
mode:
authorMatt Mower <mowerm@gmail.com>2014-03-21 00:05:41 +0100
committerMatt Mower <mowerm@gmail.com>2014-03-31 23:10:28 +0200
commitbb81e5d02df38c940709bc7416ea84620add889a (patch)
tree3de9f87f352be1b2ed26792d8e7f0d0e7ca26807 /twrpTar.cpp
parentFix /data backup size if contains media subdirs (diff)
downloadandroid_bootable_recovery-bb81e5d02df38c940709bc7416ea84620add889a.tar
android_bootable_recovery-bb81e5d02df38c940709bc7416ea84620add889a.tar.gz
android_bootable_recovery-bb81e5d02df38c940709bc7416ea84620add889a.tar.bz2
android_bootable_recovery-bb81e5d02df38c940709bc7416ea84620add889a.tar.lz
android_bootable_recovery-bb81e5d02df38c940709bc7416ea84620add889a.tar.xz
android_bootable_recovery-bb81e5d02df38c940709bc7416ea84620add889a.tar.zst
android_bootable_recovery-bb81e5d02df38c940709bc7416ea84620add889a.zip
Diffstat (limited to 'twrpTar.cpp')
-rw-r--r--twrpTar.cpp18
1 files changed, 1 insertions, 17 deletions
diff --git a/twrpTar.cpp b/twrpTar.cpp
index 0dff14d89..b053c08d4 100644
--- a/twrpTar.cpp
+++ b/twrpTar.cpp
@@ -67,10 +67,6 @@ void twrpTar::setdir(string dir) {
tardir = dir;
}
-void twrpTar::setexcl(string exclude) {
- tarexclude.push_back(exclude);
-}
-
void twrpTar::setsize(unsigned long long backup_size) {
Total_Backup_Size = backup_size;
}
@@ -447,7 +443,6 @@ int twrpTar::Generate_TarList(string Path, std::vector<TarListStruct> *TarList,
string FileName;
struct TarListStruct TarItem;
string::size_type i;
- bool skip;
if (has_data_media == 1 && Path.size() >= 11 && strncmp(Path.c_str(), "/data/media", 11) == 0)
return 0; // Skip /data/media
@@ -459,20 +454,9 @@ int twrpTar::Generate_TarList(string Path, std::vector<TarListStruct> *TarList,
return -1;
}
while ((de = readdir(d)) != NULL) {
- // Skip excluded stuff
FileName = Path + "/";
FileName += de->d_name;
- if (tarexclude.size() > 0) {
- skip = false;
- for (i = 0; i < tarexclude.size(); i++) {
- if (FileName == tarexclude[i]) {
- LOGINFO("Excluding %s\n", FileName.c_str());
- break;
- }
- }
- if (skip)
- continue;
- }
+
if (has_data_media == 1 && FileName.size() >= 11 && strncmp(FileName.c_str(), "/data/media", 11) == 0)
continue; // Skip /data/media
if (de->d_type == DT_BLK || de->d_type == DT_CHR)