New submission from Shajunxing: While using shutil.copytree() and the source containing symbolic directory (not symbolic file), an error will be raised. I checked the source code and found an obvlous mistake: shutil.copytree() using os.path.islink() to checker whether the source is a symbolic link, it's okay, but after doing this, os.path.isdir() should be called because a symbolic link may either be a file or a directry, shutil.copytree() just treated all of them as file, and invoke copy_function to copy it, so error happens.
I don't know whether newer versions have fixed this bug, but I googled it and found nothing. ---------- components: Library (Lib) files: 截图 - 2014年06月09日 - 21时14分13秒.png messages: 220088 nosy: shajunxing priority: normal severity: normal status: open title: shutil.copytree() handles symbolic directory incorrectly type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file35541/截图 - 2014年06月09日 - 21时14分13秒.png _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue21697> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com