Rollup merge of #79105 - petrochenkov:winlink, r=shepmaster

std: Fix test `symlink_hard_link` on Windows

The test was introduced in https://github.com/rust-lang/rust/pull/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.
This commit is contained in:
Mara Bos 2020-11-17 10:06:29 +01:00 committed by GitHub
commit a207801551
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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")));