[issue21697] shutil.copytree() handles symbolic directory incorrectly

Berker Peksag report at bugs.python.org
Fri Jun 13 13:22:21 CEST 2014


Berker Peksag added the comment:

Here's a patch. I'm getting the following error without modify Lib/shutil.py:

======================================================================
ERROR: test_copytree_symbolic_directory (test.test_shutil.TestShutil)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/berker/projects/cpython-default/Lib/test/test_shutil.py", line 650, in test_copytree_symbolic_directory
    shutil.copytree(src_dir, dst_dir)
  File "/home/berker/projects/cpython-default/Lib/shutil.py", line 342, in copytree
    raise Error(errors)
shutil.Error: [('/tmp/tmpiy30_34s/src/link', '/tmp/tmpiy30_34s/dst/link', "[Errno 21] Is a directory: '/tmp/tmpiy30_34s/src/link'")]

----------
keywords: +patch
nosy: +berker.peksag
stage: needs patch -> patch review
Added file: http://bugs.python.org/file35614/issue21697.diff

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21697>
_______________________________________


More information about the Python-bugs-list mailing list