summaryrefslogtreecommitdiffstats
path: root/twrpTar.cpp
diff options
context:
space:
mode:
authorbigbiff bigbiff <bigbiff@teamw.in>2013-02-27 02:10:16 +0100
committerbigbiff bigbiff <bigbiff@teamw.in>2013-02-27 18:55:40 +0100
commit71e5aa4eeef3aeab127fa1fd302bf66eedf19acb (patch)
treebca95635451d77f12b50cf0ca538845d16f51597 /twrpTar.cpp
parentChange version to 2.4.2.0 (diff)
downloadandroid_bootable_recovery-71e5aa4eeef3aeab127fa1fd302bf66eedf19acb.tar
android_bootable_recovery-71e5aa4eeef3aeab127fa1fd302bf66eedf19acb.tar.gz
android_bootable_recovery-71e5aa4eeef3aeab127fa1fd302bf66eedf19acb.tar.bz2
android_bootable_recovery-71e5aa4eeef3aeab127fa1fd302bf66eedf19acb.tar.lz
android_bootable_recovery-71e5aa4eeef3aeab127fa1fd302bf66eedf19acb.tar.xz
android_bootable_recovery-71e5aa4eeef3aeab127fa1fd302bf66eedf19acb.tar.zst
android_bootable_recovery-71e5aa4eeef3aeab127fa1fd302bf66eedf19acb.zip
Diffstat (limited to 'twrpTar.cpp')
-rw-r--r--twrpTar.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/twrpTar.cpp b/twrpTar.cpp
index c4600aa4d..0bf76e519 100644
--- a/twrpTar.cpp
+++ b/twrpTar.cpp
@@ -133,7 +133,7 @@ int twrpTar::extractTarFork() {
}
else {
if ((pid = wait(&status)) == -1) {
- LOGI("Tar creation failed\n");
+ LOGI("Tar extraction failed\n");
return -1;
}
else {
@@ -142,7 +142,7 @@ int twrpTar::extractTarFork() {
return -1;
}
else if (WIFEXITED(status) != 0)
- LOGI("Tar creation successful\n");
+ LOGI("Tar extraction successful\n");
else {
LOGI("Tar creation failed\n");
return -1;
@@ -210,6 +210,8 @@ int twrpTar::Generate_Multiple_Archives(string Path) {
FileName += de->d_name;
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)
+ continue;
if (de->d_type == DT_DIR && strcmp(de->d_name, ".") != 0 && strcmp(de->d_name, "..") != 0)
{
unsigned long long folder_size = TWFunc::Get_Folder_Size(FileName, false);
@@ -344,6 +346,8 @@ int twrpTar::tarDirs(bool include_root) {
LOGI("adding %s\n", de->d_name);
#ifdef RECOVERY_SDCARD_ON_DATA
if ((tardir == "/data" || tardir == "/data/") && strcmp(de->d_name, "media") == 0) continue;
+ if (de->d_type == DT_BLK || de->d_type == DT_CHR)
+ continue;
#endif
if (strcmp(de->d_name, ".") == 0 || strcmp(de->d_name, "..") == 0) continue;