diff options
author | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2023-04-17 10:15:36 (EDT) |
---|---|---|
committer | Patrick McDermott <patrick.mcdermott@libiquity.com> | 2023-04-17 10:15:36 (EDT) |
commit | 5d36673e124b7edf3612988b4f8ed322f03baa65 (patch) | |
tree | fdd48fe7bb66a6f3848c7f4ce6ab705c5b645273 | |
parent | d439521563540984a82ae2b460fd8e2209587a13 (diff) |
ustar: Don't read sought file
-rw-r--r-- | src/ustar.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/ustar.c b/src/ustar.c index a77dace..21d41eb 100644 --- a/src/ustar.c +++ b/src/ustar.c @@ -146,16 +146,16 @@ opkg_opk_ustar_seek(struct opkg_opk_ustar *ustar, const char *member) name[sizeof(header.name)] = '\0'; } + if (strcmp((char *) name, member) == 0) { + return OPKG_OPK_OK; /* Member found */ + } + while (ustar->data_size_remaining > 0) { if (opkg_opk_ustar_read(ustar, NULL, NULL) == OPKG_OPK_ERROR) { return OPKG_OPK_ERROR; } } - - if (strcmp((char *) name, member) == 0) { - return OPKG_OPK_OK; /* Member found */ - } } return OPKG_OPK_ERROR; /* Member not found */ |