diff options
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/CMakeLists.txt | 2 | ||||
-rw-r--r-- | src/core/function/ArchiveFileOperator.cpp | 8 |
2 files changed, 5 insertions, 5 deletions
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt index 66fe357c..7903ef80 100644 --- a/src/core/CMakeLists.txt +++ b/src/core/CMakeLists.txt @@ -62,7 +62,7 @@ endif () # link libarchive if (MINGW) find_library(LIBARCHIVE_LIB libarchive.a) - target_link_libraries(gpgfrontend_core ${LIBARCHIVE_LIB} expat lz4 zstd bcrypt lzma bz2 z) + target_link_libraries(gpgfrontend_core ${LIBARCHIVE_LIB} b2 expat lz4 zstd bcrypt lzma bz2 z) else () target_link_libraries(gpgfrontend_core archive_static) endif () diff --git a/src/core/function/ArchiveFileOperator.cpp b/src/core/function/ArchiveFileOperator.cpp index 1a1ffaec..17f29df1 100644 --- a/src/core/function/ArchiveFileOperator.cpp +++ b/src/core/function/ArchiveFileOperator.cpp @@ -231,11 +231,11 @@ void GpgFrontend::ArchiveFileOperator::ExtractArchive( LOG(ERROR) << "cannot read from stdin"; } #ifdef WINDOWS - if ((r = archive_read_open_filename_w(a, archive_path.wstring().c_str(), - 10240))) { + if (archive_read_open_filename_w(a, archive_path.wstring().c_str(), + 10240) != ARCHIVE_OK) { #else - if ((r = archive_read_open_filename(a, archive_path.u8string().c_str(), - 10240))) { + if (archive_read_open_filename(a, archive_path.u8string().c_str(), + 10240) != ARCHIVE_OK) { #endif LOG(ERROR) << "archive_read_open_filename() failed: " << archive_error_string(a); |