| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Sorry, something went wrong.
…ll mv command when moving a symlink into a direcotry that is the target of a symlink
|
Thanks @websurfer5 for the PR, and @serhiy-storchaka for merging it 🌮🎉.. I'm working now to backport this PR to: 3.11, 3.12. |
Sorry, something went wrong.
|
GH-113517 is a backport of this pull request to the 3.12 branch. |
Sorry, something went wrong.
…vior as the mv shell when moving a symlink into a directory that is the target of the symlink (pythonGH-21759) (cherry picked from commit c66b577) Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com>
|
GH-113518 is a backport of this pull request to the 3.11 branch. |
Sorry, something went wrong.
…vior as the mv shell when moving a symlink into a directory that is the target of the symlink (pythonGH-21759) (cherry picked from commit c66b577) Co-authored-by: Jeffrey Kintscher <49998481+websurfer5@users.noreply.github.com>
…vior as the mv shell when moving a symlink into a directory that is the target of the symlink (pythonGH-21759)
…vior as the mv shell when moving a symlink into a directory that is the target of the symlink (pythonGH-21759)
…vior as the mv shell when moving a symlink into a directory that is the target of the symlink (pythonGH-21759)
| Back | FazBrowse Home | New Git URL |
shutil.move() calls _samefile() to check whether a destination directory and a source path resolve to the same path. If they do, it assumes (per comment) that it is because of a case-insensitive filesystem and calls os.rename() to perform the move. When the source is a symlink that resolves to the destination directory, os.rename() raises an exception that is returned to the shutil.move() caller. By contrast, the mv shell command moves the symlink into the directory.
A solution to get the mv behavior is to check whether the source is a symlink when _samefile() returns True in order to bypass the os.rename() call and trigger the normal symlink handling in shutil.move().
https://bugs.python.org/issue26791