summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick 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)
commit5d36673e124b7edf3612988b4f8ed322f03baa65 (patch)
treefdd48fe7bb66a6f3848c7f4ce6ab705c5b645273 /src
parentd439521563540984a82ae2b460fd8e2209587a13 (diff)
ustar: Don't read sought file
Diffstat (limited to 'src')
-rw-r--r--src/ustar.c8
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 */