From a5bc780b508f373ff0c03b8a73c384204bfe1b0f Mon Sep 17 00:00:00 2001 From: Vadim Petrochenkov Date: Mon, 16 Nov 2020 21:09:26 +0300 Subject: [PATCH] std: Fix test `got_symlink_permission` on Windows --- library/std/src/fs/tests.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/library/std/src/fs/tests.rs b/library/std/src/fs/tests.rs index 0642dca8e48a7..5c969741592e6 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")));