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