mirror of
https://github.com/python/cpython.git
synced 2025-07-29 22:24:49 +00:00
Don't copy directory stat times in shutil.copytree on Windows
Fixes #1525866.
This commit is contained in:
parent
e34ac7ce7a
commit
4e67838d6c
3 changed files with 37 additions and 1 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue