aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/function/ArchiveFileOperator.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/core/function/ArchiveFileOperator.cpp')
-rw-r--r--src/core/function/ArchiveFileOperator.cpp11
1 files changed, 0 insertions, 11 deletions
diff --git a/src/core/function/ArchiveFileOperator.cpp b/src/core/function/ArchiveFileOperator.cpp
index ef04d69f..54c78628 100644
--- a/src/core/function/ArchiveFileOperator.cpp
+++ b/src/core/function/ArchiveFileOperator.cpp
@@ -159,21 +159,10 @@ void ArchiveFileOperator::NewArchive2DataExchanger(
auto fd = open(archive_entry_sourcepath(entry), O_RDONLY);
auto len = read(fd, buff.data(), buff.size());
assert(len <= buff.size() && len > 0);
- if (len == -1) {
- GF_CORE_LOG_ERROR("read() failed, ret: {}, abort ...", len);
- archive_entry_free(entry);
- close(fd);
- break;
- }
-
while (len > 0) {
archive_write_data(archive, buff.data(), len);
len = read(fd, buff.data(), buff.size());
assert(len <= buff.size() && len > 0);
- if (len == -1) {
- GF_CORE_LOG_ERROR("read() failed, ret: {}, abort ...", len);
- break;
- }
}
close(fd);
}