Skip to content

Commit a207801

Browse files
authored
Rollup merge of rust-lang#79105 - petrochenkov:winlink, r=shepmaster
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.
2 parents c4abdcf + a5bc780 commit a207801

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

library/std/src/fs/tests.rs

+3
Original file line numberDiff line numberDiff line change
@@ -1341,6 +1341,9 @@ fn metadata_access_times() {
13411341
#[test]
13421342
fn symlink_hard_link() {
13431343
let tmpdir = tmpdir();
1344+
if !got_symlink_permission(&tmpdir) {
1345+
return;
1346+
};
13441347

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

0 commit comments

Comments
 (0)