From 24ad2ce7d070ae684159b6445981017dd7a40f8a Mon Sep 17 00:00:00 2001 From: Paul Cristian Sarbu Date: Mon, 14 Aug 2023 10:00:29 +0200 Subject: ArchiveOps: Add proper autodetection option for tarballs We shouldn't exclude the possibility of receiving uncompressed tarballs as repositories in just-mr. Therefore, we introduce an explicit type that performs the autodetection (default behaviour in just-mr). This is done to also be more in line with our implementation which allows the granular handling of various archive types (currently used only for testing purposes). --- src/other_tools/utils/archive_ops.hpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/other_tools/utils/archive_ops.hpp') diff --git a/src/other_tools/utils/archive_ops.hpp b/src/other_tools/utils/archive_ops.hpp index 6ad5b7c4..74fcf39c 100644 --- a/src/other_tools/utils/archive_ops.hpp +++ b/src/other_tools/utils/archive_ops.hpp @@ -25,7 +25,14 @@ using archive = struct archive; using archive_entry = struct archive_entry; } -enum class ArchiveType : size_t { Zip, Tar, TarGz, TarBz2, TarXz }; +enum class ArchiveType : size_t { + Zip, + Tar, // uncompressed + TarGz, + TarBz2, + TarXz, + TarAuto, // autodetect tarball-type archives +}; /// \brief Class handling archiving and unarchiving operations via libarchive class ArchiveOps { -- cgit v1.2.3