Use fs blksize from stat(2)ed file when reading archives.

This commit is contained in:
Juan RP
2013-08-29 14:30:14 +02:00
parent 1bea5725ae
commit 24ff0472dd
6 changed files with 48 additions and 21 deletions

View File

@@ -123,9 +123,8 @@ open_archive(const char *url)
archive_read_support_compression_xz(a);
archive_read_support_format_tar(a);
if (archive_read_open_filename(a, url,
ARCHIVE_READ_BLOCKSIZE)) {
archive_read_close(a);
if (archive_read_open_filename(a, url, 32768)) {
archive_read_finish(a);
return NULL;
}
return a;
@@ -185,7 +184,7 @@ xbps_get_pkg_plist_from_binpkg(const char *fname, const char *plistf)
break;
}
archive_read_free(a);
archive_read_finish(a);
return plistd;
}