Fix nested file search when starter path is a file#7665
Conversation
Signed-off-by: modernzju <modernzju@outlook.com>
|
Thanks for the contribution! Before we can merge this, we need @modernzju to sign the Fuel Labs Contributor License Agreement. |
PR SummaryLow Risk Overview A unit test covers starting from a root manifest file, skipping that file, and finding a nested Reviewed by Cursor Bugbot for commit a921d53. Bugbot is set up for automated code reviews on this repo. Configure here. |
Description
This fixes
find_nested_dir_with_fileso that, when the provided starter path is a file, theWalkDirtraversal starts from the file's parent directory.The function already computed
starter_dirfor this case, but still passed the originalstarter_pathtoWalkDir. As a result, nested files such asForc.tomlcould be missed when the search started from a manifest file rather than a directory.A targeted unit test was added to cover searching from a root
Forc.tomlfile while skipping that root file and finding a nestedForc.toml.Checklist
Breaking*orNew Featurelabels where relevant.