Author takluyver
Recipients takluyver
Date 2015-07-10.21:22:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1436563341.03.0.567959413242.issue24609@psf.upfronthosting.co.za>
In-reply-to
Content
shutil.copytree behaves differently with symlinks depending on the 'symlinks' parameter. If this is True, symlinks are replicated in the destination. If False, the contents of the targets are copied to the destination.

With symlinks=False, it currently assumes that all symlinks are pointing to regular files. With a symlink to a directory, it tries to copy it using the file copy function, which fails with:

[Errno 21] Is a directory: '/tmp/tmpouavxt1u/link_to_dir'"

The attached patch adds an isdir() check to use copytree instead in that case. A test is also added.
History
Date User Action Args
2015-07-10 21:22:21takluyversetrecipients: + takluyver
2015-07-10 21:22:21takluyversetmessageid: <1436563341.03.0.567959413242.issue24609@psf.upfronthosting.co.za>
2015-07-10 21:22:20takluyverlinkissue24609 messages
2015-07-10 21:22:20takluyvercreate