From 0fd2d13ced77936e7d8f7151d6a7312dfb48de5b Mon Sep 17 00:00:00 2001 From: Patrick McDermott Date: Sat, 29 Apr 2023 19:17:52 -0400 Subject: opk: Strip leading "/" when checking names to print --- (limited to 'src') 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. */ -- cgit v0.9.1