diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2012-01-06 19:16:19 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2012-01-06 19:16:19 (GMT) |
commit | 0a08d7a09537b2ccfc93c5a81bd36cf5f1b1e92d (patch) | |
tree | 21e3d955272e135012cccdd18bc909b088da8c34 /Doc | |
parent | deec7566ae4905ec4b61495bbeb06adaa98f70ef (diff) | |
download | cpython-0a08d7a09537b2ccfc93c5a81bd36cf5f1b1e92d.zip cpython-0a08d7a09537b2ccfc93c5a81bd36cf5f1b1e92d.tar.gz cpython-0a08d7a09537b2ccfc93c5a81bd36cf5f1b1e92d.tar.bz2 |
Issue #9993: When the source and destination are on different filesystems,
and the source is a symlink, shutil.move() now recreates a symlink on the
destination instead of copying the file contents.
Patch by Jonathan Niehof and Hynek Schlawack.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/shutil.rst | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst index 45be0e5..9e8784b 100644 --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -196,7 +196,12 @@ Directory and files operations If the destination is on the current filesystem, then :func:`os.rename` is used. Otherwise, *src* is copied (using :func:`copy2`) to *dst* and then - removed. + removed. In case of symlinks, a new symlink pointing to the target of *src* + will be created in or as *dst* and *src* will be removed. + + .. versionchanged:: 3.3 + Added explicit symlink handling for foreign filesystems, thus adapting + it to the behavior of GNU's :program:`mv`. .. function:: disk_usage(path) |