Skip to content

Commit

Permalink
Unrolled build for rust-lang#119642
Browse files Browse the repository at this point in the history
Rollup merge of rust-lang#119642 - petrochenkov:winstdtest, r=ChrisDenton

library: Fix a symlink test failing on Windows
  • Loading branch information
rust-timer authored Jan 6, 2024
2 parents d62f05b + 0d70e58 commit a9c1221
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions library/std/src/fs/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -936,8 +936,10 @@ fn read_link() {
}
// Check that readlink works with non-drive paths on Windows.
let link = tmpdir.join("link_unc");
check!(symlink_dir(r"\\localhost\c$\", &link));
assert_eq!(check!(fs::read_link(&link)), Path::new(r"\\localhost\c$\"));
if got_symlink_permission(&tmpdir) {
check!(symlink_dir(r"\\localhost\c$\", &link));
assert_eq!(check!(fs::read_link(&link)), Path::new(r"\\localhost\c$\"));
};
}
let link = tmpdir.join("link");
if !got_symlink_permission(&tmpdir) {
Expand Down

0 comments on commit a9c1221

Please sign in to comment.