projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8e3ca8a
)
shutil.copytree: move copystat call for the directory after the loop
author
Johannes Gijsbers
<jlg@dds.nl>
Sun, 23 Jan 2005 12:20:15 +0000
(12:20 +0000)
committer
Johannes Gijsbers
<jlg@dds.nl>
Sun, 23 Jan 2005 12:20:15 +0000
(12:20 +0000)
copying files inside the directory, as that loop changes the atime and
mtime.
Lib/shutil.py
patch
|
blob
|
history
diff --git
a/Lib/shutil.py
b/Lib/shutil.py
index d6e7d18e14939c961363d0aeaabb620814a327a9..baedd4cd9625c5da87623fb3831a44c2ab788d5c 100644
(file)
--- 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