summaryrefslogtreecommitdiffstats
path: root/Lib/shutil.py
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/shutil.py')
-rw-r--r--Lib/shutil.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/Lib/shutil.py b/Lib/shutil.py
index d6e7d18..baedd4c 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