Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Apply suggestions from code review
Co-authored-by: Stan Ulbrych <89152624+StanFromIreland@users.noreply.github.com>
  • Loading branch information
serhiy-storchaka and StanFromIreland authored Apr 14, 2025
commit 2eeb438c1289ad5962b68ed21ec1b1f8724b0661
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Fix :func:`os.link` on platforms (like Linux) where the
system :c:func:`!link` function does not follow symlinks. On Linux,
it now follows symlinks by default and if
``follow_symlinks=True`` is specified. On Windows, it now raises error if
``follow_symlinks=True`` is passed. On macOS, it now raises error if
it now follows symlinks by default or if
``follow_symlinks=True`` is specified. On Windows, it now raises an error if
``follow_symlinks=True`` is passed. On macOS, it now raises an error if
``follow_symlinks=False`` is passed and the system :c:func:`!linkat`
function is not available at runtime.
2 changes: 1 addition & 1 deletion Modules/posixmodule.c
Original file line number Diff line number Diff line change
Expand Up @@ -4362,7 +4362,7 @@ os_link_impl(PyObject *module, path_t *src, path_t *dst, int src_dir_fd,
argument_unavailable_error("link", "src_dir_fd and dst_dir_fd");
return NULL;
}
/* See issue 41355: link() on Linux works like linkat without AT_SYMLINK_FOLLOW,
/* See issue 85527: link() on Linux works like linkat without AT_SYMLINK_FOLLOW,
but on Mac it works like linkat *with* AT_SYMLINK_FOLLOW. */
#if defined(MS_WINDOWS) || defined(__linux__)
if (follow_symlinks == 1) {
Expand Down
Loading