xbps_repository_get_pkg_plist_dict_from_url: stop processing the archive
once that 4 entries are checked for the plist file. Processing 6 entries is too much, we can be sure that plist file will always be in the first 4 entries. --HG-- extra : convert_revision : xtraeme%40gmail.com-20100122225433-u440x01bf8io3vd3
This commit is contained in:
parent
c0b280c118
commit
65f241a081
@ -194,16 +194,16 @@ xbps_repository_get_pkg_plist_dict_from_url(const char *url, const char *plistf)
|
||||
|
||||
while ((archive_read_next_header(a, &entry)) == ARCHIVE_OK) {
|
||||
curpath = archive_entry_pathname(entry);
|
||||
if (i >= 5) {
|
||||
/*
|
||||
* Archive does not contain required plist
|
||||
* file, discard it completely.
|
||||
*/
|
||||
errno = ENOENT;
|
||||
break;
|
||||
}
|
||||
if (strstr(curpath, plistf) == 0) {
|
||||
archive_read_data_skip(a);
|
||||
if (i >= 3) {
|
||||
/*
|
||||
* Archive does not contain required
|
||||
* plist file, discard it completely.
|
||||
*/
|
||||
errno = ENOENT;
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
continue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user