still error if none of the paths provided was usable fixes #39044 (cherry picked from commit e4dbabbef2)
e4dbabbef2