spatie / laravel-medialibrary

Associate files with Eloquent models
https://spatie.be/docs/laravel-medialibrary
MIT License
5.78k stars 1.08k forks source link

Unwanted deletion fixes #3619

Closed inalto closed 5 months ago

inalto commented 5 months ago

I tried to regenerate 350K+ images conversions with responsive images, i spotted some cases that lead to wrong deletions on some generated images that have a part of the name included in other filenames, so the Str::contains should be more specific and i fixed the issue borrowing the addPropertiesToFileName pattern to check "{$fileName}___{$conversionName}"; Now all the unwanted missing conversion that appeared randomly are gone away.

freekmurze commented 5 months ago

Thanks!