diff options
| author | Mara Bos <m-ou.se@m-ou.se> | 2020-11-17 10:06:29 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-11-17 10:06:29 +0100 |
| commit | a207801551e39278e9d65581d33ed22b97e19294 (patch) | |
| tree | 3187d8edfd03397a6606eac014ff19dbb92b2b9c | |
| parent | c4abdcf0ac8fd9643f1c196a418e032e85c1988c (diff) | |
| parent | a5bc780b508f373ff0c03b8a73c384204bfe1b0f (diff) | |
| download | rust-a207801551e39278e9d65581d33ed22b97e19294.tar.gz rust-a207801551e39278e9d65581d33ed22b97e19294.zip | |
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.
| -rw-r--r-- | library/std/src/fs/tests.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/library/std/src/fs/tests.rs b/library/std/src/fs/tests.rs index 0642dca8e48..5c969741592 100644 --- a/library/std/src/fs/tests.rs +++ b/library/std/src/fs/tests.rs @@ -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"))); |
