From 5311c1d7ab24f862b9b0bb272a9aee9c4f4ac023 Mon Sep 17 00:00:00 2001 From: Antoine Pitrou Date: Tue, 24 Jan 2012 08:59:28 +0100 Subject: Issue #13772: In os.symlink() under Windows, do not try to guess the link target's type (file or directory). The detection was buggy and made the call non-atomic (therefore prone to race conditions). --- Doc/library/os.rst | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'Doc') diff --git a/Doc/library/os.rst b/Doc/library/os.rst index df9a6b6602..be322a01fe 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -1429,11 +1429,9 @@ Files and Directories *target_is_directory*, which defaults to ``False``. On Windows, a symlink represents a file or a directory, and does not morph to - the target dynamically. For this reason, when creating a symlink on Windows, - if the target is not already present, the symlink will default to being a - file symlink. If *target_is_directory* is set to ``True``, the symlink will - be created as a directory symlink. This parameter is ignored if the target - exists (and the symlink is created with the same type as the target). + the target dynamically. If *target_is_directory* is set to ``True``, the + symlink will be created as a directory symlink, otherwise as a file symlink + (the default). Symbolic link support was introduced in Windows 6.0 (Vista). :func:`symlink` will raise a :exc:`NotImplementedError` on Windows versions earlier than 6.0. @@ -1446,7 +1444,6 @@ Files and Directories administrator level. Either obtaining the privilege or running your application as an administrator are ways to successfully create symlinks. - :exc:`OSError` is raised when the function is called by an unprivileged user. -- cgit v1.2.1