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

Function Find-PSDFile can return multiple matches breaking functionality #177

Open
Rehpicul opened this issue Sep 13, 2024 · 0 comments
Open

Comments

@Rehpicul
Copy link

Give how there are duplicates of the cache folder in the tree the Find-PSDFile can return multiple matches. I am sure there are multiple ways to resolve this issue however I simply added Select-Object -First 1 to make sure only one match was returned. The line number I have is 130 however I have made changes to get UNC paths working so that might not match the original line number. The function referenced can be found in the PSDUtility.psm1 file.

I changed line from: $File = Get-ChildItem -Path $LocalPath -Recurse -Filter $FileName -File
I changed the line to: $File = Get-ChildItem -Path $LocalPath -Recurse -Filter $FileName -File | Select-Object -First 1

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

No branches or pull requests

1 participant