This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jniehof
Recipients jniehof
Date 2010-09-29.23:03:10
SpamBayes Score 7.807522e-06
Marked as misclassified No
Message-id <1285801392.69.0.814963089991.issue9993@psf.upfronthosting.co.za>
In-reply-to
Content
shutil.move does not behave as I expect when moving a symlink across filesystems. (This is when src itself is a symlink, not when it is a directory tree including symlinks.)

-If src is a symlink to file, rather than moving the symlink, it copies the contents of the file
-If src is a symlink to a directory, rather than moving the symlink, it copies the contents of the directory to a new directory
-If src is a dangling symlink, it errors out

Attached patch against the py3k branch adds tests for these cases and adds the expected behaviour, which is to recreate the symlink.

(I have encountered this on 2.6 - current SVN; it is probably in 2.5 as well but I have not confirmed.)
History
Date User Action Args
2010-09-29 23:03:12jniehofsetrecipients: + jniehof
2010-09-29 23:03:12jniehofsetmessageid: <1285801392.69.0.814963089991.issue9993@psf.upfronthosting.co.za>
2010-09-29 23:03:11jniehoflinkissue9993 messages
2010-09-29 23:03:11jniehofcreate