Blame SOURCES/0011-Fix-listing-with-more-than-one-star.patch
|
|
90e381 |
From 32e6642640635d7305969f808b5badb706a11bff Mon Sep 17 00:00:00 2001
|
|
|
90e381 |
From: Martin Sehnoutka <msehnout@redhat.com>
|
|
|
90e381 |
Date: Wed, 7 Sep 2016 11:36:17 +0200
|
|
|
90e381 |
Subject: [PATCH 11/59] Fix listing with more than one star '*'.
|
|
|
90e381 |
|
|
|
90e381 |
This is a regression introduced by some previous patch.
|
|
|
90e381 |
---
|
|
|
90e381 |
ls.c | 14 ++++++++++++++
|
|
|
90e381 |
1 file changed, 14 insertions(+)
|
|
|
90e381 |
|
|
|
90e381 |
diff --git a/ls.c b/ls.c
|
|
|
90e381 |
index f489478..616b2d9 100644
|
|
|
90e381 |
--- a/ls.c
|
|
|
90e381 |
+++ b/ls.c
|
|
|
90e381 |
@@ -311,6 +311,20 @@ vsf_filename_passes_filter(const struct mystr* p_filename_str,
|
|
|
90e381 |
{
|
|
|
90e381 |
goto out;
|
|
|
90e381 |
}
|
|
|
90e381 |
+ if (!must_match_at_current_pos && last_token == 0)
|
|
|
90e381 |
+ {
|
|
|
90e381 |
+ struct mystr last_str = INIT_MYSTR;
|
|
|
90e381 |
+ str_mid_to_end(&name_remain_str, &last_str,
|
|
|
90e381 |
+ str_getlen(&name_remain_str) - str_getlen(&s_match_needed_str));
|
|
|
90e381 |
+ locate_result = str_locate_str(&last_str, &s_match_needed_str);
|
|
|
90e381 |
+ str_free(&last_str);
|
|
|
90e381 |
+
|
|
|
90e381 |
+ if (locate_result.found)
|
|
|
90e381 |
+ {
|
|
|
90e381 |
+ ret = 1;
|
|
|
90e381 |
+ }
|
|
|
90e381 |
+ goto out;
|
|
|
90e381 |
+ }
|
|
|
90e381 |
/* Chop matched string out of remainder */
|
|
|
90e381 |
str_mid_to_end(&name_remain_str, &temp_str,
|
|
|
90e381 |
indexx + str_getlen(&s_match_needed_str));
|
|
|
90e381 |
--
|
|
|
90e381 |
2.14.4
|
|
|
90e381 |
|