unpack: really skip current data on archive with noextract.

This commit is contained in:
Juan RP 2020-01-26 10:35:40 +01:00
parent 8a0c3032b7
commit 40dd4deb4d
No known key found for this signature in database
GPG Key ID: AF19F6CB482F9368

View File

@ -309,9 +309,11 @@ unpack_archive(struct xbps_handle *xhp,
* Skip files that match noextract patterns from configuration file. * Skip files that match noextract patterns from configuration file.
*/ */
if (xhp->noextract && xbps_patterns_match(xhp->noextract, entry_pname+1)) { if (xhp->noextract && xbps_patterns_match(xhp->noextract, entry_pname+1)) {
xbps_dbg_printf(xhp, "[unpack] %s skipped (matched by a pattern)\n", entry_pname+1);
xbps_set_cb_state(xhp, XBPS_STATE_UNPACK_FILE_PRESERVED, 0, xbps_set_cb_state(xhp, XBPS_STATE_UNPACK_FILE_PRESERVED, 0,
pkgver, "%s: file `%s' won't be extracted, " pkgver, "%s: file `%s' won't be extracted, "
"it matches a noextract pattern.", pkgver, entry_pname); "it matches a noextract pattern.", pkgver, entry_pname);
archive_read_data_skip(ar);
continue; continue;
} }
/* /*