Skip to content

Honor the requested mode in the Windows access provider #705

Closed

Description

@LunaStev

Problem

std/sys/windows/fs.wave exposes FS_F_OK, FS_X_OK, FS_W_OK, and FS_R_OK, but access(path, mode) never reads mode. Any existing path therefore succeeds regardless of the requested access check, so a write check currently behaves the same as an existence check.

Other filesystem providers pass the requested mode through to their native access primitive, so the Windows provider does not preserve the portable contract.

Completion criteria

  • Keep FS_F_OK as an existence check.
  • Make nonzero access modes affect the Windows result instead of being ignored.
  • Ensure a read-only file does not report writable for FS_W_OK.
  • Define and test the Windows behavior for the exported FS_R_OK and FS_X_OK modes.
  • Return the existing portable negative error codes on failure.
  • Add focused Windows regression coverage for existence, readable, and non-writable cases.

Difficulty: easy.

Activity

  1. added
    bug
    good first issue
    os compatibility
    on Sep 24, 2026
  2. self-assigned this
    on Sep 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

buggood first issueos compatibility

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions