Skip to content

Incorrect POSIXError (Code 52) when creating duplicate directory in 4.0.0+ #126

@zytx

Description

@zytx

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

  1. Create a directory (e.g., /test/directory)
  2. Attempt to create the same directory again
  3. Observe error:
    POSIXError(_nsError: Error Domain=NSPOSIXErrorDomain Code=52 "Network dropped connection on reset" UserInfo={NSLocalizedDescription=Error code 52:  Create failed with status -1073741771.})

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions