summaryrefslogtreecommitdiffstats
path: root/twrpTar.cpp
diff options
context:
space:
mode:
authorVojtech Bocek <vbocek@gmail.com>2014-03-11 22:08:23 +0100
committerVojtech Bocek <vbocek@gmail.com>2014-03-13 14:55:12 +0100
commit05f87d6ccaa2d4666dd97cb1d2eeb88bd4e5306f (patch)
treecc437d7f9e3166215dbbd973486ec6a43a590bab /twrpTar.cpp
parentCheck to ensure that selinux_handle is populated before using (diff)
downloadandroid_bootable_recovery-05f87d6ccaa2d4666dd97cb1d2eeb88bd4e5306f.tar
android_bootable_recovery-05f87d6ccaa2d4666dd97cb1d2eeb88bd4e5306f.tar.gz
android_bootable_recovery-05f87d6ccaa2d4666dd97cb1d2eeb88bd4e5306f.tar.bz2
android_bootable_recovery-05f87d6ccaa2d4666dd97cb1d2eeb88bd4e5306f.tar.lz
android_bootable_recovery-05f87d6ccaa2d4666dd97cb1d2eeb88bd4e5306f.tar.xz
android_bootable_recovery-05f87d6ccaa2d4666dd97cb1d2eeb88bd4e5306f.tar.zst
android_bootable_recovery-05f87d6ccaa2d4666dd97cb1d2eeb88bd4e5306f.zip
Diffstat (limited to 'twrpTar.cpp')
-rw-r--r--twrpTar.cpp15
1 files changed, 3 insertions, 12 deletions
diff --git a/twrpTar.cpp b/twrpTar.cpp
index a31fe1221..c024821ab 100644
--- a/twrpTar.cpp
+++ b/twrpTar.cpp
@@ -124,10 +124,7 @@ int twrpTar::createTarFork() {
continue; // Skip /data/media
if (de->d_type == DT_BLK || de->d_type == DT_CHR)
continue;
- bool skip_dir = false;
- string dir(de->d_name);
- skip_dir = du.check_skip_dirs(dir);
- if (de->d_type == DT_DIR && !skip_dir) {
+ if (de->d_type == DT_DIR && !du.check_skip_dirs(tardir, de->d_name)) {
item_len = strlen(de->d_name);
if (userdata_encryption && ((item_len >= 3 && strncmp(de->d_name, "app", 3) == 0) || (item_len >= 6 && strncmp(de->d_name, "dalvik", 6) == 0))) {
if (Generate_TarList(FileName, &RegularList, &target_size, &regular_thread_id) < 0) {
@@ -171,10 +168,7 @@ int twrpTar::createTarFork() {
continue; // Skip /data/media
if (de->d_type == DT_BLK || de->d_type == DT_CHR)
continue;
- bool skip_dir = false;
- string dir(de->d_name);
- skip_dir = du.check_skip_dirs(dir);
- if (de->d_type == DT_DIR && !skip_dir) {
+ if (de->d_type == DT_DIR && !du.check_skip_dirs(tardir, de->d_name)) {
item_len = strlen(de->d_name);
if (userdata_encryption && ((item_len >= 3 && strncmp(de->d_name, "app", 3) == 0) || (item_len >= 6 && strncmp(de->d_name, "dalvik", 6) == 0))) {
// Do nothing, we added these to RegularList earlier
@@ -485,10 +479,7 @@ int twrpTar::Generate_TarList(string Path, std::vector<TarListStruct> *TarList,
continue;
TarItem.fn = FileName;
TarItem.thread_id = *thread_id;
- bool skip_dir = false;
- string dir(de->d_name);
- skip_dir = du.check_skip_dirs(dir);
- if (de->d_type == DT_DIR && !skip_dir) {
+ if (de->d_type == DT_DIR && !du.check_skip_dirs(Path, de->d_name)) {
TarList->push_back(TarItem);
if (Generate_TarList(FileName, TarList, Target_Size, thread_id) < 0)
return -1;