Skip to content

ConfigDirs and DataDirs return Unix paths on every platform, including Windows #437

Open

Description

@David-Noble-at-work

Epic: #430 · Feature: #431

pkg/xdg/xdg.go returns the specification defaults /etc/xdg and
/usr/local/share:/usr/share. Correct on Linux and Darwin; wrong twice on Windows -- the directories do
not exist, and a leading separator with no volume is drive-relative.

The package documents the invariant these break: no anchor can resolve to a relative path.
TestNoAnchorIsEverRelative proves it for the five base accessors and does not cover these two --
the gap that let it ship.

Exposure is zero today (no callers outside the package's own tests), which is why it survived and why
it is cheap now and expensive to inherit: a system-wide install makes DataDirs() the natural place to
look for machine-wide completions and man pages.

Windows has no search-path concept to copy, so the semantics need researching against comparable tools
the way step 54's layout ruling was -- not picked for tidiness.

Charter: step 59.

Activity

  1. added
    bugSomething isn't working
    Severity:MediumBroken with a workaround, or a narrow path
    and removed
    taskImplementation work item
    on Aug 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Epic:WindowsCampaignThe Windows campaign epicPriority:P2Scheduled, not urgentSeverity:MediumBroken with a workaround, or a narrow pathbugSomething isn't working

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions