Open ekutner opened 2 years ago
This seems like a duplicate of https://github.com/gohugoio/hugo/issues/7686.
@jmooring Although it's related I don't think it's the same thing. In the other issue the match fails, in this case it succeeds but the results have lower case paths. My guess is that the root cause might be the same. If the search string is converted to lower case before searching then on Linux it wouldn't find any matches, on windows it does but it probably just concatenates the path back to the found files instead of using the response from the file system, so it's still lowercase.
MRE
git clone --single-branch -b hugo-github-issue-10112 https://github.com/jmooring/hugo-testing hugo-github-issue-10112
cd hugo-github-issue-10112
hugo server
What does MRE mean?
Minimal reproducible example. Sorry, I will stop using that abbreviation.
This issue has been automatically marked as stale because it has not had recent activity. The resources of the Hugo team are limited, and so we are asking for your help.
If this is a bug and you can still reproduce this error on the master
branch, please reply with all of the information you have about it in order to keep the issue open.
If this is a feature request, and you feel that it is still relevant and valuable, please tell us why.
This issue will automatically be closed in the near future if no further activity occurs. Thank you for all your contributions.
What version of Hugo are you using (
hugo version
)?Calling _resources.Match to fetch files from the assets folder with a path that contains upper case letters is returning results where the path is converted to lower case.
For example, this code:
Produces results that look like:
/gallery/travel/iceland/DJI_0026-Edit.jpg
But they should be:
/gallery/Travel/Iceland/DJI_0026-Edit.jpg
Notes:
Workaround: Searching for
"*gallery/Travel/Iceland/*.jpg"
produces correct results.