Skip to content

馃悰 fix(api): build site paths from site lists - #604

Merged
gaborbernat merged 3 commits into
tox-dev:mainfrom
9Kun:fix/windows-applications-path-semicolon
Sep 29, 2026
Merged

gaborbernat merged 3 commits into
tox-dev:mainfrom
9Kun:fix/windows-applications-path-semicolon

Conversation

@9Kun

@9Kun 9Kun commented Sep 29, 2026 •

Copy link
Copy Markdown
Contributor

Under multipath=True the base site_applications_path split site_applications_dir on os.pathsep for every platform. Outside Unix and macOS that value is one directory, so a name holding the separator got cut. Windows turned C:\Programs;Shared into C:\Programs, and Android with appname="a:b" returned /data/data/<package>/files/a. 馃悰 The first version of this PR fixed Windows alone.

Each site kind that can span several directories (data, config, cache and applications) now has a list in the base class that defaults to its single *_dir. The base *_path and iter_*_dirs read that list. 馃敡 Unix and macOS supply their search paths and drop their own copies of those accessors, so no accessor parses a joined string anymore. platformdirs.testing.isolated_dirs restores the base lists, which then follow the redirected directories for every kind.

Unix and macOS results do not change, since each entry there comes from a list split on os.pathsep and cannot contain it. An OpenAI Codex agent wrote the original Windows patch at the account owner's request.

@gaborbernat gaborbernat added the bug Something isn't working label Sep 29, 2026
@gaborbernat gaborbernat changed the title fix: preserve Windows site applications paths with semicolons 馃悰 fix(api): keep os.pathsep in site_applications_path Sep 29, 2026

@gaborbernat gaborbernat left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@gaborbernat
gaborbernat enabled auto-merge (squash) September 29, 2026 16:39
The base site_applications_path split site_applications_dir on
os.pathsep under multipath. Outside Unix and macOS that value is one
path, so a name holding the separator got cut, and Android with
appname="a:b" gave files/a. The Windows override in this PR left
Android and iOS broken.

Each site kind that can span several directories now has a list in
the base class, defaulting to its single *_dir, and the base *_path
and iter_*_dirs read that list. Unix and macOS supply their search
paths and drop their own copies, so no accessor parses a joined
string. isolated_dirs restores the base lists, which then follow the
redirected dirs for every kind.
@gaborbernat
gaborbernat force-pushed the fix/windows-applications-path-semicolon branch from b2ec920 to d2b388c Compare September 29, 2026 16:46
@gaborbernat gaborbernat changed the title 馃悰 fix(api): keep os.pathsep in site_applications_path 馃悰 fix(api): build site paths from site lists Sep 29, 2026
@gaborbernat
gaborbernat merged commit d5ff75c into tox-dev:main Sep 29, 2026
36 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants