diff options
author | Saturneric <[email protected]> | 2022-03-19 07:52:21 +0000 |
---|---|---|
committer | Saturneric <[email protected]> | 2022-03-19 07:52:21 +0000 |
commit | 6d63541757ef1def421b886b4f51aa6cf1b68257 (patch) | |
tree | fea38279b689ddfbaae1be0478d844e68bd05366 /src/core/function/ArchiveFileOperator.h | |
parent | <fix>(core): Fix the path compatibility problem of loading certificates under... (diff) | |
download | GpgFrontend-6d63541757ef1def421b886b4f51aa6cf1b68257.tar.gz GpgFrontend-6d63541757ef1def421b886b4f51aa6cf1b68257.zip |
<fix>(core, ui): Fix issues related to compression and decompression
1. The problem with double-byte characters in the path (unresolved)
Diffstat (limited to 'src/core/function/ArchiveFileOperator.h')
-rw-r--r-- | src/core/function/ArchiveFileOperator.h | 20 |
1 files changed, 1 insertions, 19 deletions
diff --git a/src/core/function/ArchiveFileOperator.h b/src/core/function/ArchiveFileOperator.h index c86c6f69..324d9d53 100644 --- a/src/core/function/ArchiveFileOperator.h +++ b/src/core/function/ArchiveFileOperator.h @@ -44,25 +44,7 @@ struct ArchiveStruct { class ArchiveFileOperator { public: - static void ListArchive(const std::filesystem::path &archive_path) { - struct archive *a; - struct archive_entry *entry; - int r; - - a = archive_read_new(); - archive_read_support_filter_all(a); - archive_read_support_format_all(a); - r = archive_read_open_filename(a, archive_path.u8string().c_str(), - 10240); // Note 1 - if (r != ARCHIVE_OK) return; - while (archive_read_next_header(a, &entry) == ARCHIVE_OK) { - LOG(INFO) << "File: " << archive_entry_pathname(entry); - LOG(INFO) << "File Path: " << archive_entry_pathname(entry); - archive_read_data_skip(a); // Note 2 - } - r = archive_read_free(a); // Note 3 - if (r != ARCHIVE_OK) return; - } + static void ListArchive(const std::filesystem::path &archive_path); static void CreateArchive( const std::filesystem::path &base_path, |