1dfd6b7b76
Error handling was missing here, so we would later get confusing EBADF errors due to dirfd being -1.
Error handling was missing here, so we would later get confusing EBADF errors due to dirfd being -1.