forked from lix-project/lix
Maximilian Bosch
c85467a1b6
This reverts commit 50a35860ee
.
With this change Nix fails to open bzip2 logfiles that were created from
builds with no stdout/stderr.
29 lines
597 B
C++
29 lines
597 B
C++
#include "serialise.hh"
|
|
#include <archive.h>
|
|
|
|
namespace nix {
|
|
|
|
struct TarArchive {
|
|
struct archive * archive;
|
|
Source * source;
|
|
std::vector<unsigned char> buffer;
|
|
|
|
void check(int err, const std::string & reason = "failed to extract archive (%s)");
|
|
|
|
TarArchive(Source & source, bool raw = false);
|
|
|
|
TarArchive(const Path & path);
|
|
|
|
// disable copy constructor
|
|
TarArchive(const TarArchive &) = delete;
|
|
|
|
void close();
|
|
|
|
~TarArchive();
|
|
};
|
|
void unpackTarfile(Source & source, const Path & destDir);
|
|
|
|
void unpackTarfile(const Path & tarFile, const Path & destDir);
|
|
|
|
}
|