diff options
author | Johannes Gijsbers <jlg@dds.nl> | 2005-01-23 12:20:15 +0000 |
---|---|---|
committer | Johannes Gijsbers <jlg@dds.nl> | 2005-01-23 12:20:15 +0000 |
commit | cfb82e61276782d9f1ba5c3574a9759d4a68579e (patch) | |
tree | 256bcf6f4dc5ee827737e3e148f3e6b273f4befb /Lib/shutil.py | |
parent | 00e6c7535966b3ab79bc1efc4bf20f071cec46eb (diff) | |
download | cpython-cfb82e61276782d9f1ba5c3574a9759d4a68579e.tar.gz |
shutil.copytree: move copystat call for the directory after the loop
copying files inside the directory, as that loop changes the atime and
mtime.
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r-- | Lib/shutil.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py index d6e7d18e14..baedd4cd96 100644 --- a/Lib/shutil.py +++ b/Lib/shutil.py @@ -109,7 +109,6 @@ def copytree(src, dst, symlinks=False): """ names = os.listdir(src) os.makedirs(dst) - copystat(src, dst) errors = [] for name in names: srcname = os.path.join(src, name) @@ -125,6 +124,7 @@ def copytree(src, dst, symlinks=False): # XXX What about devices, sockets etc.? except (IOError, os.error), why: errors.append((srcname, dstname, why)) + copystat(src, dst) if errors: raise Error, errors |