Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prevent hidden folders in volumes from being indexed #11384

Merged
merged 3 commits into from
Jun 7, 2022

Conversation

mmikkel
Copy link
Contributor

@mmikkel mmikkel commented Jun 4, 2022

Description

I don't know if this is the way you want to go with it, but if merged this PR should resolve #11362.

This PR changes the way the Asset Indexes utility compiles the list of files to index, by making the AssetIndexer::startIndexingSession() method pull the indexing file list via the AssetIndexer::getIndexListOnVolume() method, instead of getting it directly from the volume's filesystem instance.

This makes sure that any files in folders beginning with an underscore are completely ignored during the indexing process, which is consistent with how asset indexing currently works in 4.x via CLI, as well as how indexing via the Asset Indexes utility worked in 3.x.

This PR also fixes a wrongly typed exception handler in the AssetIndexer service.

Related issues

#11362

@mmikkel mmikkel requested a review from a team as a code owner June 4, 2022 12:48
@brandonkelly brandonkelly merged commit 57e89ba into craftcms:develop Jun 7, 2022
@brandonkelly
Copy link
Member

Thanks so much @mmikkel!

@brandonkelly
Copy link
Member

Craft 4.0.5 is out now with that fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[4.x]: Asset Update Indexes broken - indexing hidden transform subfolders
2 participants