aboutsummaryrefslogtreecommitdiffstats
path: root/src/core/function/ArchiveFileOperator.cpp
diff options
context:
space:
mode:
authorsaturneric <[email protected]>2024-01-19 12:10:17 +0000
committersaturneric <[email protected]>2024-01-19 12:10:17 +0000
commitf22ceca734868a4cb946c232f661aad72da01ded (patch)
tree5d858753ca06a8dfed12a92f4762e579900cfb1f /src/core/function/ArchiveFileOperator.cpp
parentfix: slove discovered bugs (diff)
downloadGpgFrontend-f22ceca734868a4cb946c232f661aad72da01ded.tar.gz
GpgFrontend-f22ceca734868a4cb946c232f661aad72da01ded.zip
fix: slove discovered faults and bugs
Diffstat (limited to 'src/core/function/ArchiveFileOperator.cpp')
-rw-r--r--src/core/function/ArchiveFileOperator.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/core/function/ArchiveFileOperator.cpp b/src/core/function/ArchiveFileOperator.cpp
index 54c78628..f1345f87 100644
--- a/src/core/function/ArchiveFileOperator.cpp
+++ b/src/core/function/ArchiveFileOperator.cpp
@@ -158,11 +158,9 @@ void ArchiveFileOperator::NewArchive2DataExchanger(
if (r > ARCHIVE_FAILED) {
auto fd = open(archive_entry_sourcepath(entry), O_RDONLY);
auto len = read(fd, buff.data(), buff.size());
- assert(len <= buff.size() && len > 0);
while (len > 0) {
archive_write_data(archive, buff.data(), len);
len = read(fd, buff.data(), buff.size());
- assert(len <= buff.size() && len > 0);
}
close(fd);
}
@@ -179,6 +177,7 @@ void ArchiveFileOperator::NewArchive2DataExchanger(
void ArchiveFileOperator::ExtractArchiveFromDataExchanger(
std::shared_ptr<GFDataExchanger> ex, const QString &target_path,
const OperationCallback &cb) {
+ GF_CORE_LOG_INFO("target path: {}", target_path);
RunIOOperaAsync(
[=](const DataObjectPtr &data_object) -> GFError {
auto *archive = archive_read_new();