Blame SOURCES/0011-Fix-listing-with-more-than-one-star.patch

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