PSD icon indicating copy to clipboard operation
PSD copied to clipboard

Function Find-PSDFile can return multiple matches breaking functionality

Open Rehpicul opened this issue 1 year ago • 0 comments

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

Rehpicul avatar Sep 13 '24 14:09 Rehpicul