summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorPatrick McDermott <patrick.mcdermott@libiquity.com>2023-04-29 19:17:52 (EDT)
committer Patrick McDermott <patrick.mcdermott@libiquity.com>2023-04-29 19:17:52 (EDT)
commit0fd2d13ced77936e7d8f7151d6a7312dfb48de5b (patch)
tree4b2414db552914ce40f7938a029c6325d09155fe /src
parentcb09917d64f9b2c20a699db0da97eee4560abd84 (diff)
opk: Strip leading "/" when checking names to print
Diffstat (limited to 'src')
-rw-r--r--src/opk.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/opk.c b/src/opk.c
index 3c1c74e..0288ade 100644
--- a/src/opk.c
+++ b/src/opk.c
@@ -86,6 +86,8 @@ _opkg_opk_opk_add_seek_name(struct _opkg_opk_opk_seek_name **head,
}
if (name[0] == '.' && name[1] == '/') {
new->name = name + 2;
+ } else if (name[0] == '/') {
+ new->name = name + 1;
} else {
new->name = name;
}
@@ -194,6 +196,8 @@ _opkg_opk_opk_check_name(const char *member_name,
if (member_name[0] == '.' && member_name[1] == '/') {
member_name += 2;
+ } else if (member_name[0] == '/') {
+ member_name += 1;
}
/* Check each requested name. */