(original) (raw)
diff --git a/Doc/library/shutil.rst b/Doc/library/shutil.rst --- a/Doc/library/shutil.rst +++ b/Doc/library/shutil.rst @@ -161,8 +161,9 @@ Recursively move a file or directory to another location. - If the destination is on the current filesystem, then simply use rename. - Otherwise, copy src (with :func:`copy2`) to the dst and then remove src. + Try to use :func:`os.rename` to perform the move. If that fails, for example + because src and dst are on different filesystems, fallback to copying src + (with :func:`copy2`) to the dst and then removing src. .. function:: disk_usage(path)