You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The old resolver would try to run broken symlinks. The new one skips them and continues searching.
To test this I created the simplest program that will run successfully.
Z:\test> mkdir exists
Z:\test> cd exists
Z:\test\exists> gc exe_exists.rs
fn main() {}
Z:\test\exists> rustc exe_exists.rs
Z:\test\exists> cd ..
Z:\test>
Then I used the following test program:
// run_symlink.rsuse std::process::Command;use std::os::windows::fs::symlink_file;use std::env;use std::fs;fnmain() -> std::io::Result<()>{// Get the directory of the working exeletmut exists = env::current_dir()?;
exists.push("exists");// Set up a directory for the broken symlink...letmut bins = env::current_dir()?;
bins.push("bins");
fs::create_dir(&bins)?;// ...and create the symlink.letmut exe_path = bins.clone();
exe_path.push("exe_exists.exe");symlink_file("DOES NOT EXIST",&exe_path)?;// Set up the `PATH` environment variable with our paths.let paths = env::join_paths(&[&bins,&exists]).unwrap();
env::set_var("PATH", paths);// Try to run the file. It will try the broken symlink first.let result = Command::new("exe_exists.exe").spawn();println!("{:?}", result);// Cleanup
fs::remove_dir_all(&bins)?;Ok(())}
The old resolver would try to run broken symlinks. The new one skips them and continues searching.
To test this I created the simplest program that will run successfully.
Then I used the following test program:
The result of compiling and running this program:
@rustbot claim
@rustbot label +O-windows
The text was updated successfully, but these errors were encountered: