diff options
author | bigbiff bigbiff <bigbiff@teamw.in> | 2013-07-12 00:50:29 +0200 |
---|---|---|
committer | Dees_Troy <dees_troy@teamw.in> | 2013-08-28 17:06:18 +0200 |
commit | 616afed985266ed8ce1851d744808645ff961829 (patch) | |
tree | a4d53f0528e49ecaf49433bd7c02f95d6621f61d | |
parent | Add a TW_NO_TIMEOUT option (diff) | |
download | android_bootable_recovery-616afed985266ed8ce1851d744808645ff961829.tar android_bootable_recovery-616afed985266ed8ce1851d744808645ff961829.tar.gz android_bootable_recovery-616afed985266ed8ce1851d744808645ff961829.tar.bz2 android_bootable_recovery-616afed985266ed8ce1851d744808645ff961829.tar.lz android_bootable_recovery-616afed985266ed8ce1851d744808645ff961829.tar.xz android_bootable_recovery-616afed985266ed8ce1851d744808645ff961829.tar.zst android_bootable_recovery-616afed985266ed8ce1851d744808645ff961829.zip |
Diffstat (limited to '')
-rw-r--r-- | twrp-functions.cpp | 2 | ||||
-rw-r--r-- | twrpTar.cpp | 12 |
2 files changed, 7 insertions, 7 deletions
diff --git a/twrp-functions.cpp b/twrp-functions.cpp index 1d2d63229..e54e760ab 100644 --- a/twrp-functions.cpp +++ b/twrp-functions.cpp @@ -185,7 +185,7 @@ unsigned long long TWFunc::Get_Folder_Size(const string& Path, bool Display_Erro while ((de = readdir(d)) != NULL) { - 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) { dutemp = Get_Folder_Size((Path + "/" + de->d_name), Display_Error); dusize += dutemp; 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<TarListStruct> *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 |