mirror of
https://github.com/privatevoid-net/nix-super.git
synced 2024-11-22 05:56:15 +02:00
Tarball fetcher: Fix handling of cached tarballs
Fixes a regression introduced in
5a9e1c0d20
where downloading a cached
file causes the error "Failed to open archive (Unrecognized archive
format)".
This commit is contained in:
parent
f809edba4f
commit
79ed3df8f8
1 changed files with 2 additions and 0 deletions
|
@ -81,6 +81,7 @@ TarArchive::TarArchive(Source & source, bool raw, std::optional<std::string> com
|
|||
if (!raw) {
|
||||
archive_read_support_format_tar(archive);
|
||||
archive_read_support_format_zip(archive);
|
||||
archive_read_support_format_empty(archive);
|
||||
} else {
|
||||
archive_read_support_format_raw(archive);
|
||||
archive_read_support_format_empty(archive);
|
||||
|
@ -99,6 +100,7 @@ TarArchive::TarArchive(const Path & path)
|
|||
archive_read_support_filter_all(archive);
|
||||
archive_read_support_format_tar(archive);
|
||||
archive_read_support_format_zip(archive);
|
||||
archive_read_support_format_empty(archive);
|
||||
archive_read_set_option(archive, NULL, "mac-ext", NULL);
|
||||
check(archive_read_open_filename(archive, path.c_str(), 16384), "failed to open archive: %s");
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue