diff options
author | saturneric <[email protected]> | 2024-01-24 09:52:51 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-01-24 10:08:19 +0000 |
commit | 8cb450e916b15f50599d14ee36b707a2703423f5 (patch) | |
tree | d0df0aa24fab98114b6346c6836c145797119391 /src/core/function/ArchiveFileOperator.cpp | |
parent | fix: improve file page (diff) | |
download | GpgFrontend-8cb450e916b15f50599d14ee36b707a2703423f5.tar.gz GpgFrontend-8cb450e916b15f50599d14ee36b707a2703423f5.zip |
fix: try to solve bugs at universal file operations
Diffstat (limited to 'src/core/function/ArchiveFileOperator.cpp')
-rw-r--r-- | src/core/function/ArchiveFileOperator.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/core/function/ArchiveFileOperator.cpp b/src/core/function/ArchiveFileOperator.cpp index f1345f87..976b6c5c 100644 --- a/src/core/function/ArchiveFileOperator.cpp +++ b/src/core/function/ArchiveFileOperator.cpp @@ -133,10 +133,13 @@ void ArchiveFileOperator::NewArchive2DataExchanger( archive_read_disk_descend(disk); // turn absolute path to relative path - archive_entry_set_pathname( + archive_entry_set_pathname_utf8( entry, - base_path.relativeFilePath(QString(archive_entry_pathname(entry))) + base_path + .relativeFilePath(QString(archive_entry_pathname_utf8(entry))) .toUtf8()); + GF_CORE_LOG_DEBUG("archive entry input path: {}", + archive_entry_pathname_utf8(entry)); r = archive_write_header(archive, entry); if (r < ARCHIVE_OK) { @@ -228,9 +231,11 @@ void ArchiveFileOperator::ExtractArchiveFromDataExchanger( break; } - archive_entry_set_pathname( - entry, - (target_path + "/" + archive_entry_pathname(entry)).toUtf8()); + archive_entry_set_pathname_utf8( + entry, (target_path + "/" + archive_entry_pathname_utf8(entry)) + .toUtf8()); + GF_CORE_LOG_DEBUG("archive entry output path: {}", + archive_entry_pathname_utf8(entry)); r = archive_write_header(ext, entry); if (r != ARCHIVE_OK) { |