Fix incorrect assumption about `Path.extension()` (#24443)

Release Notes:

- N/A
a1544f47adBen Kunkle committed on 2/7/2025, 3:37:07 PM· committed by GitHubparent4f65cfa
1 file changedLine totals unavailable