[Python-checkins] python/dist/src/Lib shutil.py,1.35,1.36

jlgijsbers at users.sourceforge.net jlgijsbers at users.sourceforge.net
Sun Jan 23 13:20:18 CET 2005


Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25483

Modified Files:
	shutil.py 
Log Message:
shutil.copytree: move copystat call for the directory after the loop
copying files inside the directory, as that loop changes the atime and
mtime.


Index: shutil.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/shutil.py,v
retrieving revision 1.35
retrieving revision 1.36
diff -u -d -r1.35 -r1.36
--- shutil.py	8 Jan 2005 12:31:29 -0000	1.35
+++ shutil.py	23 Jan 2005 12:20:15 -0000	1.36
@@ -109,7 +109,6 @@
     """
     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 @@
             # XXX What about devices, sockets etc.?
         except (IOError, os.error), why:
             errors.append((srcname, dstname, why))
+    copystat(src, dst)
     if errors:
         raise Error, errors
 



More information about the Python-checkins mailing list