Skip to content

std: let a later $HOME entry clear an earlier one in user-dirs.dirs - #166638

Open
devnexen wants to merge 2 commits into
rust-lang:mainfrom
devnexen:fs_dirs_fix
Open

devnexen wants to merge 2 commits into
rust-lang:mainfrom
devnexen:fs_dirs_fix

Conversation

@devnexen

Copy link
Copy Markdown
Contributor

LLM used to find the issue.

@rustbot rustbot added O-unix Operating system: Unix-like S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Nov 27, 2026
@rustbot

rustbot commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

r? @clarfonthey

rustbot has assigned @clarfonthey.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: @ChrisDenton, libs
  • @ChrisDenton, libs expanded to 38 candidates
  • Random selection from JohnTitor, Mark-Simulacrum, clarfonthey, joboet

@clarfonthey

clarfonthey commented Nov 27, 2026 •

Copy link
Copy Markdown
Contributor

This seems to disregard the current unquoting logic, so, I would at least like to see some tests covering that case as well. I don't think that we need to cover weird cases like $HOME/.// but at least ensuring it works without quotes is desirable.

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 27, 2026
@rustbot

rustbot commented Nov 27, 2026

Copy link
Copy Markdown
Collaborator

Reminder, once the PR becomes ready for a review, use @rustbot ready.

@clarfonthey

Copy link
Copy Markdown
Contributor

Hmm, actually, now that I'm looking at the spec, it appears that xdg-user-dirs explicitly requires quotes: https://man.archlinux.org/man/user-dirs.dirs.5.en

I think it's probably worthwhile to include this case anyway, but it does appear that the current version of the software considers unquoted values to be ill-defined. Going to poke at the implementation to see if they handle quotes anyway.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

O-unix Operating system: Unix-like S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants