In Windows, the error for a path reparse (e.g. symlink or junction) that can't be resolved is ERROR_CANT_RESOLVE_FILENAME. Another common error is ERROR_INVALID_REPARSE_DATA. This can occur if the reparse data is malformed or if the target device is invalid for the reparse type. For example, a junction is restricted to [bind-]mounting local volumes, so it's invalid if it targets a remote device.
Windows errors to ignore should be added to _IGNORED_WINERRORS in Lib/pathlib.py. For example:
_IGNORED_WINERRORS = (
# ...
1921, # ERROR_CANT_RESOLVE_FILENAME - similar to POSIX ELOOP
4392, # ERROR_INVALID_REPARSE_DATA - also for disallowed device targets
) |