Skip to content

UserDefaults doesn't work on Windows when USERNAME and USERPROFILE don't match #4997

@stevenbrix

Description

@stevenbrix

Since UserDefaults hand builds the path to the local app data location, this location is incorrect if the USERNAME doesn't match the USERPROFILE location directory. This means that all UserDefaults writes will fail because the location on disk won't exist.

Activity

changed the title [-]UserDefaults doesn't work on Windows when USERNAME and UserDir don't match[/-] [+]UserDefaults doesn't work on Windows when USERNAME and USERPROFILE don't match[/+] on Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Participants

      @jakepetroules@stevenbrix

      Issue actions

        UserDefaults doesn't work on Windows when USERNAME and USERPROFILE don't match · Issue #4997 · swiftlang/swift-corelibs-foundation