Skip to content

Commit

Permalink
Rollup merge of rust-lang#79105 - petrochenkov:winlink, r=shepmaster
Browse files Browse the repository at this point in the history
std: Fix test `symlink_hard_link` on Windows

The test was introduced in rust-lang#78026 and fails depending on Windows version and admin rights.
Other similar tests check for symlink creation permissions before doing anything, this PR performs the same check for `symlink_hard_link` as well.
  • Loading branch information
m-ou-se authored Nov 17, 2020
2 parents c4abdcf + a5bc780 commit a207801
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions library/std/src/fs/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1341,6 +1341,9 @@ fn metadata_access_times() {
#[test]
fn symlink_hard_link() {
let tmpdir = tmpdir();
if !got_symlink_permission(&tmpdir) {
return;
};

// Create "file", a file.
check!(fs::File::create(tmpdir.join("file")));
Expand Down

0 comments on commit a207801

Please sign in to comment.