summaryrefslogtreecommitdiffstats
path: root/twrpTar.cpp
diff options
context:
space:
mode:
authorbigbiff bigbiff <bigbiff@teamw.in>2013-10-12 02:28:00 +0200
committerDees Troy <dees_troy@teamw.in>2013-10-17 18:49:49 +0200
commitc49d7069039241ad02a8a710e9054d253abee3ad (patch)
tree40d9a8e023ad47e9a4032d23b160770e4fcaa12d /twrpTar.cpp
parentMerge "Ensure root folders get added in split archives" into twrp2.7 (diff)
downloadandroid_bootable_recovery-c49d7069039241ad02a8a710e9054d253abee3ad.tar
android_bootable_recovery-c49d7069039241ad02a8a710e9054d253abee3ad.tar.gz
android_bootable_recovery-c49d7069039241ad02a8a710e9054d253abee3ad.tar.bz2
android_bootable_recovery-c49d7069039241ad02a8a710e9054d253abee3ad.tar.lz
android_bootable_recovery-c49d7069039241ad02a8a710e9054d253abee3ad.tar.xz
android_bootable_recovery-c49d7069039241ad02a8a710e9054d253abee3ad.tar.zst
android_bootable_recovery-c49d7069039241ad02a8a710e9054d253abee3ad.zip
Diffstat (limited to 'twrpTar.cpp')
-rw-r--r--twrpTar.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/twrpTar.cpp b/twrpTar.cpp
index 76c23c868..eba482ee7 100644
--- a/twrpTar.cpp
+++ b/twrpTar.cpp
@@ -34,6 +34,7 @@ extern "C" {
#include <sstream>
#include <vector>
#include <dirent.h>
+#include <libgen.h>
#include <sys/mman.h>
#include "twrpTar.hpp"
#include "twcommon.h"
@@ -532,7 +533,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 && strcmp(de->d_name, "lost+foud") != 0)
+ 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);
if (Archive_Current_Size + folder_size > MAX_ARCHIVE_SIZE) {
@@ -723,6 +724,10 @@ int twrpTar::tarDirs(bool include_root) {
if (strcmp(de->d_name, ".") != 0) {
subfolder += de->d_name;
} else {
+ std::string parentDir = basename(subfolder.c_str());
+ LOGINFO("parentDir: %s\n", parentDir.c_str());
+ if (!parentDir.compare("lost+found"))
+ continue;
LOGINFO("tarDirs addFile '%s' including root: %i\n", subfolder.c_str(), include_root);
if (addFile(subfolder, include_root) != 0)
return -1;