Closed kauz56 closed 1 year ago
@xerc I'm sorry, I don't understand what you mean. Can you be more specific?
/\.[^\.]+\..*webp$
filters for expl. .x.xwebp
which can not happen => just copy my statement
@xerc So you're saying my regex would match a file ".something.webp", whereas your's wouldn't? If so, I don't see any added value there, because the file list filters dotfiles by default. If it didn't filter dotfiles by default, a scenario where someone uploads a file .jpg
would be possible. Resulting, the generation of a file .jpg.webp
would also be possible, which my regex would then filter out correctly.
Feel free to correct me if I'm missing the point, but I don't think statements like "just copy my code" are very productive. If I'm asked to consider a change, I need to understand what I'd be changing and why.
your new regex matches fefewf.fcew.cefewebp
which can not happen
@xerc Thanks for clarifying! I changed the commit accordingly.
np // please run php .Build/bin/php-cs-fixer fix --config php-cs-fixer.config.php
& include the modif./cleanup
and consider the \
ref. https://github.com/plan2net/webp/blame/master/Classes/Converter/PhpGdConverter.php#L66
Done. @plan2net If you decide to merge this, please consider squashing the commits.
@kauz56 Thanks, I solved this a little different, Commit 3b4f0715a0a6fe9f8bf24af8617fc5c99144009d in master (let me know if that works for you, then I'll tag it): I introduced a new extension configuration for the pattern to exclude (with a default pattern), so it's now totally flexible.
@wazum Works for me, thanks!
Closing, solved by https://github.com/plan2net/webp/commit/3b4f0715a0a6fe9f8bf24af8617fc5c99144009d.
This changes the filtering behaviour for file lists, so that it only filters generated webp files, but not regular, user submitted ones. These are distinguished by checking for a preceding file suffix before the ".webp".
Edit: @plan2net If you decide to merge this, please consider squashing the commits.