if (archive_read_open_filename(archive,
const_cast<char*>(filename.c_str()),
ARCHIVE_DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK)
- throw runtime_error_with_errno("could not open " + filename);
+ throw runtime_error_with_errno("could not open " + filename, archive_errno(archive));
for (i = 0; archive_read_next_header(archive, &entry) ==
ARCHIVE_OK; ++i) {
if (S_ISREG(status->st_mode) &&
archive_read_data_skip(archive) != ARCHIVE_OK)
- throw runtime_error_with_errno("could not read " + filename);
+ throw runtime_error_with_errno("could not read " + filename, archive_errno(archive));
}
if (i == 0) {
if (archive_read_open_filename(archive,
const_cast<char*>(filename.c_str()),
ARCHIVE_DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK)
- throw runtime_error_with_errno("could not open " + filename);
+ throw runtime_error_with_errno("could not open " + filename, archive_errno(archive));
chdir(root.c_str());
if (archive_read_open_filename(archive,
const_cast<char*>(filename.c_str()),
ARCHIVE_DEFAULT_BYTES_PER_BLOCK) != ARCHIVE_OK)
- throw runtime_error_with_errno("could not open " + filename);
+ throw runtime_error_with_errno("could not open " + filename, archive_errno(archive));
for (i = 0; archive_read_next_header(archive, &entry) ==
ARCHIVE_OK; ++i) {
if (S_ISREG(status->st_mode) &&
archive_read_data_skip(archive))
- throw runtime_error_with_errno("could not read " + filename);
+ throw runtime_error_with_errno("could not read " + filename, archive_errno(archive));
}
if (i == 0) {