Closed faltjo closed 1 month ago
Might be slightly related to statamic/cms#5595.
What collation is your database using? I'm guessing its case sensitive?
In the example I am using a sqlite database. I am not 100 % sure, but what I have found, the default for sqlite databases is NOT to use NOCASE collation, which means: yes, it is case-sensitive.
In production, where I originally stumbled over this problem, a postgres DB with UTF-8 collation is used, which is also case-sensitive.
I'm torn as to whether we should fix this or not. It's entirely feasible your database is case sensitive and your filesystem is too, in which case the current behaviour is expected, not a bug.
My feeling would be if you are wanting case insensitivity you should also make a migration to set the assets columns to be case insensitive.
Closing this due to inactivity, but feel free to re-open if you want to continue the conversation.
Bug description
After creating and saving an asset using eloquent-driver, the used AssetContainer returns
true
when checking for existence of a file on the same path and same name, except the filename uses different upper- or lower-case letters than the asset from before.This might be expected behavior, especially when config
statamic.assets.lowercase = true
, however when trying to read meta-data of the file with differing case filename nothing is returned.Expected behavior If filenames (or paths?) are treated case-insensitive for handling the file's content, the same should be true for the file's metadata.
How to reproduce
A minimal example is given in a test case here https://github.com/faltjo/eloquent-driver-case-sensitive-filenames
git clone https://github.com/faltjo/eloquent-driver-case-sensitive-filenames
composer install
php artisan key:generate
./vendor/bin/pest
Logs
No response
Environment
Additional details
No response