mirror of
https://github.com/rust-lang/rust.git
synced 2024-11-23 15:23:46 +00:00
Fix for issue #93283
This commit is contained in:
parent
17dfae79bb
commit
b795ae5280
@ -1,5 +1,6 @@
|
||||
use crate::io::prelude::*;
|
||||
|
||||
use crate::env;
|
||||
use crate::fs::{self, File, OpenOptions};
|
||||
use crate::io::{ErrorKind, SeekFrom};
|
||||
use crate::path::Path;
|
||||
@ -906,7 +907,14 @@ fn read_link() {
|
||||
// junction
|
||||
assert_eq!(check!(fs::read_link(r"C:\Users\Default User")), Path::new(r"C:\Users\Default"));
|
||||
// junction with special permissions
|
||||
assert_eq!(check!(fs::read_link(r"C:\Documents and Settings\")), Path::new(r"C:\Users"));
|
||||
// Since not all localized windows versions contain the folder "Documents and Settings" in english,
|
||||
// we will briefly check, if it exists and otherwise skip the test. Except during CI we will always execute the test.
|
||||
if Path::new(r"C:\Documents and Settings\").exists() || env::var_os("CI").is_some() {
|
||||
assert_eq!(
|
||||
check!(fs::read_link(r"C:\Documents and Settings\")),
|
||||
Path::new(r"C:\Users")
|
||||
);
|
||||
}
|
||||
}
|
||||
let tmpdir = tmpdir();
|
||||
let link = tmpdir.join("link");
|
||||
|
Loading…
Reference in New Issue
Block a user