Tracking issue: `std::filesystem::path` headaches, and breakage on Windows with non-ASCII paths
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 122k
- Forks
- 37.3k
- Avg merge
- 4d 2h
- Merged PRs (30d)
- 283
Description
Version
v24.1.0
Platform
Microsoft Windows NT 10.0.19045.0 x64
Subsystem
No response
What steps will reproduce the bug?
Couldn't find a tracking issue for this one.
There are places in the source that handle std::filesystem::path objects, and on Windows, this involves conversion between UTF-8 strings and wchar-based paths. This can lead to path corruption, as previously discussed.
One example of this is #56049, which has an open PR to fix this specific usage. However, #58764 has just been reported, which affects a completely different area of the API. There are other examples of usage elsewhere in the source.
It feels like this probably needs a library-wide approach – even if not removing std::filesystem::path entirely as previously discussed, then at least some sort of internal wrapper API to abstract out potential footguns.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing #56049 and #58764, then search the source for other std::filesystem::path usage. Done requires an agreed library-wide approach for handling Windows path conversions and resolution of the affected usages, including those examples.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- operating-systems
- Issue type
- Refactor
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100