Repository navigation
fix: stop listing macOS ._ files as recipes - #557
Merged
Merged
Conversation
On a collection shared over Samba, macOS writes AppleDouble `._<name>` companions next to every file it touches. They end in `.cook` but are binary resource forks, and since 0.37 the web UI listed each one as a recipe, sorted ahead of the real files. Bump cooklang-find to 0.8.1, whose walks no longer match dotfiles or descend into hidden directories. `shopping-list <dir>` lists the directory itself rather than going through cooklang-find, so skip hidden entries there too. Fixes #555
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #555.
Cause
cooklang-find 0.7.1 started reading non-UTF-8 files lossily (for #498). macOS AppleDouble
._<name>.cookcompanions had always matched**/*.cook. They only stayed hidden because their binary content failed the UTF-8 read, so after that change they appeared in the web UI as recipes.Changes
.git,.Trashes, …). A collection under a hidden base path such as~/.recipesstill works. This covers the server's recipe tree, search, and menus.shopping-list <dir>: this command lists the directory itself rather than going through cooklang-find, so it now skips hidden entries as well. It has a new regression test intests/shopping_list_test.rs, which failed before the fix.Verification
cargo fmt,cargo clippy --all-targetsandcargo testare all clean.cook searchover a directory containingsoup.cook,._soup.cookand.git/old.cookreturns onlysoup.cook.