From 616afed985266ed8ce1851d744808645ff961829 Mon Sep 17 00:00:00 2001 From: bigbiff bigbiff Date: Thu, 11 Jul 2013 18:50:29 -0400 Subject: ignore lost+found in all the places --- twrpTar.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'twrpTar.cpp') diff --git a/twrpTar.cpp b/twrpTar.cpp index 5964f2f88..2b8cd7dc4 100644 --- a/twrpTar.cpp +++ b/twrpTar.cpp @@ -114,7 +114,7 @@ int twrpTar::createTarFork() { 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) { + if (de->d_type == DT_DIR && strcmp(de->d_name, ".") != 0 && strcmp(de->d_name, "..") != 0 && strcmp(de->d_name, "lost+found") != 0) { 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, ®ular_thread_id) < 0) { @@ -158,7 +158,7 @@ int twrpTar::createTarFork() { 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) { + if (de->d_type == DT_DIR && strcmp(de->d_name, ".") != 0 && strcmp(de->d_name, "..") != 0 && strcmp(de->d_name, "lost+found") != 0) { 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 @@ -471,7 +471,7 @@ int twrpTar::Generate_TarList(string Path, std::vector *TarList, continue; TarItem.fn = FileName; TarItem.thread_id = *thread_id; - if (de->d_type == DT_DIR && strcmp(de->d_name, ".") != 0 && strcmp(de->d_name, "..") != 0) { + if (de->d_type == DT_DIR && strcmp(de->d_name, ".") != 0 && strcmp(de->d_name, "..") != 0 && strcmp(de->d_name, "lost+found") != 0) { TarList->push_back(TarItem); if (Generate_TarList(FileName, TarList, Target_Size, thread_id) < 0) return -1; @@ -531,7 +531,7 @@ int twrpTar::Generate_Multiple_Archives(string Path) { 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) + if (de->d_type == DT_DIR && strcmp(de->d_name, ".") != 0 && strcmp(de->d_name, "..") != 0 && strcmp(de->d_name, "lost+foud") != 0) { unsigned long long folder_size = TWFunc::Get_Folder_Size(FileName, false); if (Archive_Current_Size + folder_size > MAX_ARCHIVE_SIZE) { @@ -666,7 +666,7 @@ int twrpTar::tarDirs(bool include_root) { bool skip; d = opendir(tardir.c_str()); - if (d != NULL) { + if (d != NULL) { if (!tarexclude.empty()) { strcpy(excl, tarexclude.c_str()); split = TWFunc::split_string(tarexclude, ' ', true); @@ -676,7 +676,7 @@ int twrpTar::tarDirs(bool include_root) { #ifdef RECOVERY_SDCARD_ON_DATA if ((tardir == "/data" || tardir == "/data/") && strcmp(de->d_name, "media") == 0) continue; #endif - if (de->d_type == DT_BLK || de->d_type == DT_CHR || strcmp(de->d_name, "..") == 0) + if (de->d_type == DT_BLK || de->d_type == DT_CHR || strcmp(de->d_name, "..") == 0 || strcmp(de->d_name, "lost+found") == 0) continue; // Skip excluded stuff -- cgit v1.2.3