rust/library
Chris Denton 2b7fe7e0a1
Make try_exists return Ok(true) for Windows UDS
`fs::try_exists` currently fails on Windows if encountering a Unix Domain Socket (UDS). Fix this by checking for an error code that's returned when there's a failure to use a reparse point.

A reparse point is a way to invoke a filesystem filter on a file instead of the file being opened normally. This is used to implement symbolic links (by redirecting to a different path) but also to implement other types of special files such as Unix domain sockets. If the reparse point is not a link type then opening it with `CreateFileW` may fail with `ERROR_CANT_ACCESS_FILE` because the filesystem filter does not implement that operation. This differs from resolving links which may fail with errors such as `ERROR_FILE_NOT_FOUND` or `ERROR_CANT_RESOLVE_FILENAME`.

So `ERROR_CANT_ACCESS_FILE` means that the file exists but that we can't open it normally. Still, the file does exist so `try_exists` should report that as `Ok(true)`.
2023-10-13 06:02:18 +01:00
..
alloc Auto merge of #115948 - notriddle:notriddle/logo-lockup, r=fmease 2023-10-11 06:28:36 +00:00
backtrace@99faef833f Bump backtrace to 0.3.69 2023-08-22 15:01:14 -07:00
core Auto merge of #112818 - Benjamin-L:add-slice_split_once, r=cuviper 2023-10-11 08:19:13 +00:00
panic_abort Rebase to master 2023-09-22 17:23:33 +05:30
panic_unwind Rename BoxMeUp to PanicPayload. 2023-09-20 19:24:52 +02:00
portable-simd remove repetitive words 2023-07-31 16:13:02 +08:00
proc_macro rustdoc: remove rust logo from non-Rust crates 2023-10-08 20:17:53 -07:00
profiler_builtins Bump cfg(bootstrap) 2023-08-23 20:05:14 -04:00
rtstartup Remove custom frame info registration on i686-pc-windows-gnu 2022-08-23 16:12:58 +08:00
rustc-std-workspace-alloc Replace libstd, libcore, liballoc in line comments. 2022-12-30 14:00:42 +01:00
rustc-std-workspace-core Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
rustc-std-workspace-std Switch all libraries to the 2021 edition 2021-12-23 19:03:47 +08:00
std Make try_exists return Ok(true) for Windows UDS 2023-10-13 06:02:18 +01:00
stdarch@333e9e9977 Bump stdarch submodule 2023-10-02 23:43:35 +02:00
sysroot Expose compiler-builtins-weak-intrinsics feature for -Zbuild-std 2023-06-23 11:15:34 +01:00
test rustdoc: remove rust logo from non-Rust crates 2023-10-08 20:17:53 -07:00
unwind Support AIX in Rust standard library 2023-10-09 14:02:57 +08:00