Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use PathBuf APIs to correctly do some path manipulation cross-platform #4061

Merged
merged 1 commit into from
Nov 26, 2024

Conversation

asquared31415
Copy link
Contributor

Under certain weird configurations (for example running default powershell through the Zed editor built from source on Windows), the path manipulation could create a file path that looked like \\?\C:\Path\To\Project/file.d, and Windows does not accept a / for paths that use the \\?\ syntax.

This would cause an error like failed to create fake .d file: Os { code: 123, kind: InvalidFilename, message: "The filename, directory name, or volume label syntax is incorrect." }

@RalfJung
Copy link
Member

Makes sense, thanks!

@RalfJung RalfJung added this pull request to the merge queue Nov 26, 2024
Merged via the queue into rust-lang:master with commit 401abf7 Nov 26, 2024
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants