Author takluyver
Recipients takluyver
Date 2015-07-10.21:22:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
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.
Date User Action Args
2015-07-10 21:22:21takluyversetrecipients: + takluyver
2015-07-10 21:22:21takluyversetmessageid: <>
2015-07-10 21:22:20takluyverlinkissue24609 messages
2015-07-10 21:22:20takluyvercreate