summaryrefslogtreecommitdiffstats
path: root/twrpTar.cpp
diff options
context:
space:
mode:
authorbigbiff bigbiff <bigbiff@teamw.in>2014-03-17 01:32:50 +0100
committerbigbiff bigbiff <bigbiff@teamw.in>2014-03-17 01:32:50 +0100
commitec8fc28866e9f62d3146a9b374b544dc4518fa14 (patch)
treee12b480030623737c7cae62aa2b6901ba545ca7e /twrpTar.cpp
parentImprove handling of settings storage and android secure (diff)
downloadandroid_bootable_recovery-ec8fc28866e9f62d3146a9b374b544dc4518fa14.tar
android_bootable_recovery-ec8fc28866e9f62d3146a9b374b544dc4518fa14.tar.gz
android_bootable_recovery-ec8fc28866e9f62d3146a9b374b544dc4518fa14.tar.bz2
android_bootable_recovery-ec8fc28866e9f62d3146a9b374b544dc4518fa14.tar.lz
android_bootable_recovery-ec8fc28866e9f62d3146a9b374b544dc4518fa14.tar.xz
android_bootable_recovery-ec8fc28866e9f62d3146a9b374b544dc4518fa14.tar.zst
android_bootable_recovery-ec8fc28866e9f62d3146a9b374b544dc4518fa14.zip
Diffstat (limited to '')
-rw-r--r--twrpTar.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/twrpTar.cpp b/twrpTar.cpp
index c024821ab..0dff14d89 100644
--- a/twrpTar.cpp
+++ b/twrpTar.cpp
@@ -570,8 +570,8 @@ int twrpTar::tarList(std::vector<TarListStruct> *TarList, unsigned thread_id) {
while (i < list_size) {
if (TarList->at(i).thread_id == thread_id) {
strcpy(buf, TarList->at(i).fn.c_str());
- stat(buf, &st);
- if (st.st_mode & S_IFREG) { // item is a regular file
+ lstat(buf, &st);
+ if (S_ISREG(st.st_mode)) { // item is a regular file
if (Archive_Current_Size + (unsigned long long)(st.st_size) > MAX_ARCHIVE_SIZE) {
if (closeTar() != 0) {
LOGERR("Error closing '%s' on thread %i\n", tarfn.c_str(), thread_id);