* grub-core/commands/wildcard.c (match_files): Add a useful dprintf.
(wildcard_expand): Don't stop on nonregexp parts after regexp ones since it truncates the output. Reported by: Ximin Luo.
This commit is contained in:
parent
98e2f50661
commit
4388ca7224
2 changed files with 9 additions and 2 deletions
|
@ -1,3 +1,10 @@
|
||||||
|
2011-06-24 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* grub-core/commands/wildcard.c (match_files): Add a useful dprintf.
|
||||||
|
(wildcard_expand): Don't stop on nonregexp parts after regexp ones since
|
||||||
|
it truncates the output.
|
||||||
|
Reported by: Ximin Luo.
|
||||||
|
|
||||||
2011-06-24 Vladimir Serbinenko <phcoder@gmail.com>
|
2011-06-24 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Skip . and ..
|
* grub-core/fs/iso9660.c (grub_iso9660_iterate_dir): Skip . and ..
|
||||||
|
|
|
@ -288,6 +288,8 @@ match_files (const char *prefix, const char *suffix, const char *end,
|
||||||
if (regexec (regexp, name, 0, 0, 0))
|
if (regexec (regexp, name, 0, 0, 0))
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
|
grub_dprintf ("expand", "matched\n");
|
||||||
|
|
||||||
buffer = grub_xasprintf ("%s%s", dir, name);
|
buffer = grub_xasprintf ("%s%s", dir, name);
|
||||||
if (! buffer)
|
if (! buffer)
|
||||||
return 1;
|
return 1;
|
||||||
|
@ -423,8 +425,6 @@ wildcard_expand (const char *s, char ***strs)
|
||||||
while (*start)
|
while (*start)
|
||||||
{
|
{
|
||||||
split_path (start, &noregexop, ®exop);
|
split_path (start, &noregexop, ®exop);
|
||||||
if (noregexop >= regexop) /* no more wildcards */
|
|
||||||
break;
|
|
||||||
|
|
||||||
if (make_regex (noregexop, regexop, ®exp))
|
if (make_regex (noregexop, regexop, ®exp))
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|
Loading…
Reference in a new issue