about summary refs log tree commit diff
path: root/src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
diff options
context:
space:
mode:
authorDan Gohman <dev@sunfishcode.online>2020-10-16 09:09:20 -0700
committerDan Gohman <dev@sunfishcode.online>2020-10-16 12:05:49 -0700
commit91a9f83dd1d73cfd451f81306361df3fafad84a5 (patch)
treeb3eff22b5672b6fbd8099552216dbc58c65ee78f /src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs
parenta78a62fc996ba16f7a111c99520b23f77029f4eb (diff)
downloadrust-91a9f83dd1d73cfd451f81306361df3fafad84a5.tar.gz
rust-91a9f83dd1d73cfd451f81306361df3fafad84a5.zip
Define `fs::hard_link` to not follow symlinks.
POSIX leaves it implementation-defined whether `link` follows symlinks.
In practice, for example, on Linux it does not and on FreeBSD it does.
So, switch to `linkat`, so that we can pick a behavior rather than
depending on OS defaults.

Pick the option to not follow symlinks. This is somewhat arbitrary, but
seems the less surprising choice because hard linking is a very
low-level feature which requires the source and destination to be on
the same mounted filesystem, and following a symbolic link could end
up in a different mounted filesystem.
Diffstat (limited to 'src/test/codegen/src-hash-algorithm/src-hash-algorithm-sha1.rs')
0 files changed, 0 insertions, 0 deletions