mirror of
https://codeberg.org/la-chouette/minishell.git
synced 2025-12-06 07:28:09 +01:00
fix(expansion/wildcard): do not remove quotes twice on non-pattern strings
There is still an issue with removing too many quotes when expanding variables (see #138). This will be tackled in a later PR.
This commit is contained in:
parent
aca85c3583
commit
2180909285
4 changed files with 19 additions and 5 deletions
|
|
@ -6,7 +6,7 @@
|
|||
/* By: khais <marvin@42.fr> +#+ +:+ +#+ */
|
||||
/* +#+#+#+#+#+ +#+ */
|
||||
/* Created: 2025/03/20 15:01:38 by jguelen #+# #+# */
|
||||
/* Updated: 2025/04/08 16:31:46 by khais ### ########.fr */
|
||||
/* Updated: 2025/04/22 13:18:18 by khais ### ########.fr */
|
||||
/* */
|
||||
/* ************************************************************************** */
|
||||
|
||||
|
|
@ -168,6 +168,8 @@ char fits_pattern(char *str, t_worddesc *pattern)
|
|||
*/
|
||||
t_wordlist *expand_star(t_worddesc *file_pattern)
|
||||
{
|
||||
if (!ispattern(file_pattern))
|
||||
return (NULL);
|
||||
clean_pattern(file_pattern);
|
||||
return (expand_star_core(file_pattern));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue