1 |
commit: f177ab6944e899a8444640ed125ee7f4e1f6589d |
2 |
Author: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu Jan 2 10:32:27 2020 +0000 |
4 |
Commit: Fabian Groffen <grobian <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Jan 2 10:32:27 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/proj/portage-utils.git/commit/?id=f177ab69 |
7 |
|
8 |
libq/atom: also strip/ignore .tbz2 suffix (like .ebuild) |
9 |
|
10 |
Signed-off-by: Fabian Groffen <grobian <AT> gentoo.org> |
11 |
|
12 |
libq/atom.c | 3 ++- |
13 |
1 file changed, 2 insertions(+), 1 deletion(-) |
14 |
|
15 |
diff --git a/libq/atom.c b/libq/atom.c |
16 |
index 946e821..e79c30a 100644 |
17 |
--- a/libq/atom.c |
18 |
+++ b/libq/atom.c |
19 |
@@ -118,7 +118,8 @@ atom_explode(const char *atom) |
20 |
strcpy(ret->CATEGORY, atom); |
21 |
|
22 |
/* eat file name crap when given an (autocompleted) path */ |
23 |
- if ((ptr = strstr(ret->CATEGORY, ".ebuild")) != NULL) |
24 |
+ if ((ptr = strstr(ret->CATEGORY, ".ebuild")) != NULL || |
25 |
+ (ptr = strstr(ret->CATEGORY, ".tbz2")) != NULL) |
26 |
*ptr = '\0'; |
27 |
|
28 |
/* chip off the trailing ::REPO as needed */ |