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

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