Don't copy directory stat times in shutil.copytree on Windows

Fixes #1525866.
This commit is contained in:
Martin v. Löwis 2006-07-30 13:00:31 +00:00
parent e34ac7ce7a
commit 4e67838d6c
3 changed files with 37 additions and 1 deletions

View file

@ -127,7 +127,13 @@ def copytree(src, dst, symlinks=False):
# continue with other files
except Error, err:
errors.extend(err.args[0])
copystat(src, dst)
try:
copystat(src, dst)
except WindowsError:
# can't copy file access times on Windows
pass
except OSError, why:
errors.extend((src, dst, str(why)))
if errors:
raise Error, errors