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/root_maps/content_git_map.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/other_tools/root_maps/content_git_map.cpp') diff --git a/src/other_tools/root_maps/content_git_map.cpp b/src/other_tools/root_maps/content_git_map.cpp index 7f0b30e0..5fb1bd88 100644 --- a/src/other_tools/root_maps/content_git_map.cpp +++ b/src/other_tools/root_maps/content_git_map.cpp @@ -31,7 +31,8 @@ namespace { std::filesystem::path const& dst_dir) noexcept -> std::optional { if (repo_type == "archive") { - return ArchiveOps::ExtractArchive(ArchiveType::Tar, archive, dst_dir); + return ArchiveOps::ExtractArchive( + ArchiveType::TarAuto, archive, dst_dir); } if (repo_type == "zip") { return ArchiveOps::ExtractArchive(ArchiveType::Zip, archive, dst_dir); -- cgit v1.2.3