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:
commit
a207801551
1 changed files with 3 additions and 0 deletions
|
@ -1341,6 +1341,9 @@ fn metadata_access_times() {
|
||||||
#[test]
|
#[test]
|
||||||
fn symlink_hard_link() {
|
fn symlink_hard_link() {
|
||||||
let tmpdir = tmpdir();
|
let tmpdir = tmpdir();
|
||||||
|
if !got_symlink_permission(&tmpdir) {
|
||||||
|
return;
|
||||||
|
};
|
||||||
|
|
||||||
// Create "file", a file.
|
// Create "file", a file.
|
||||||
check!(fs::File::create(tmpdir.join("file")));
|
check!(fs::File::create(tmpdir.join("file")));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue