Description
After upgrading to version 4.0.0+, attempting to create a directory that already exists incorrectly throws a POSIXError with code 52 ("Network dropped connection on reset") instead of the expected file already exists error (EEXIST, POSIX code 17). This breaks backward compatibility with error-handling logic that previously relied on checking for EEXIST.
Steps to Reproduce
- Create a directory (e.g.,
/test/directory)
- Attempt to create the same directory again
- Observe error:
POSIXError(_nsError: Error Domain=NSPOSIXErrorDomain Code=52 "Network dropped connection on reset" UserInfo={NSLocalizedDescription=Error code 52: Create failed with status -1073741771.})