summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDees Troy <dees_troy@teamw.in>2014-04-01 20:55:39 +0200
committerGerrit Code Review <gerrit2@gerrit>2014-04-01 20:55:40 +0200
commit3a746d607e0f45da038987358e760ecef3c9ad25 (patch)
tree1ed84b39d576e7b3c1915c096eb6d6b545763aec
parentMerge "if md5 check is not selected for subpartitions, don't check it." into android-4.4 (diff)
parentRemove deprecated tar exclude functionality (diff)
downloadandroid_bootable_recovery-3a746d607e0f45da038987358e760ecef3c9ad25.tar
android_bootable_recovery-3a746d607e0f45da038987358e760ecef3c9ad25.tar.gz
android_bootable_recovery-3a746d607e0f45da038987358e760ecef3c9ad25.tar.bz2
android_bootable_recovery-3a746d607e0f45da038987358e760ecef3c9ad25.tar.lz
android_bootable_recovery-3a746d607e0f45da038987358e760ecef3c9ad25.tar.xz
android_bootable_recovery-3a746d607e0f45da038987358e760ecef3c9ad25.tar.zst
android_bootable_recovery-3a746d607e0f45da038987358e760ecef3c9ad25.zip
Diffstat (limited to '')
-rw-r--r--partition.cpp6
-rw-r--r--twrpTar.cpp18
-rw-r--r--twrpTar.hpp3
-rw-r--r--twrpTarMain/twrpTarMain.cpp4
4 files changed, 2 insertions, 29 deletions
diff --git a/partition.cpp b/partition.cpp
index 1ae54f57e..2ebb5c597 100644
--- a/partition.cpp
+++ b/partition.cpp
@@ -1618,11 +1618,7 @@ bool TWPartition::Backup_Tar(string backup_folder) {
DataManager::GetValue(TW_USE_COMPRESSION_VAR, use_compression);
tar.use_compression = use_compression;
- //exclude Google Music Cache
- vector<string> excludedirs = du.get_absolute_dirs();
- for (int i = 0; i < excludedirs.size(); ++i) {
- tar.setexcl(excludedirs.at(i));
- }
+
#ifndef TW_EXCLUDE_ENCRYPTED_BACKUPS
DataManager::GetValue("tw_encrypt_backup", use_encryption);
if (use_encryption && Can_Encrypt_Backup) {
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)
diff --git a/twrpTar.hpp b/twrpTar.hpp
index a42dea0e1..443e5f4b3 100644
--- a/twrpTar.hpp
+++ b/twrpTar.hpp
@@ -47,7 +47,6 @@ public:
virtual ~twrpTar();
int createTarFork();
int extractTarFork();
- void setexcl(string exclude);
void setfn(string fn);
void setdir(string dir);
void setsize(unsigned long long backup_size);
@@ -91,8 +90,6 @@ private:
string basefn;
string password;
- vector <string> tarexclude;
-
std::vector<TarListStruct> *ItemList;
int thread_id;
};
diff --git a/twrpTarMain/twrpTarMain.cpp b/twrpTarMain/twrpTarMain.cpp
index ef6a5efea..b28a42ea7 100644
--- a/twrpTarMain/twrpTarMain.cpp
+++ b/twrpTarMain/twrpTarMain.cpp
@@ -122,10 +122,6 @@ int main(int argc, char **argv) {
}
}
- vector<string> excludedirs = du.get_absolute_dirs();
- for (j = 0; j < excludedirs.size(); ++j) {
- tar.setexcl(excludedirs.at(j));
- }
tar.has_data_media = has_data_media;
tar.setdir(Directory);
tar.setfn(Tar_Filename);