fs: improve error performance of opendirSync
#49705
+73
−9
Merged