rust-lang / miri

An interpreter for Rust's mid-level intermediate representation
Apache License 2.0
4.66k stars 349 forks source link

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

Closed asquared31415 closed 6 days ago

asquared31415 commented 1 week ago

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 commented 6 days ago

Makes sense, thanks!