ianaré added the comment: Rather than try in copytree and try again in copy2, why not add this to the root of the issue - copystat. Something like this?
def copystat(src, dst, ignore_permission_err=False): """Copy all stat info (mode bits, atime and mtime) from src to dst""" st = os.stat(src) mode = stat.S_IMODE(st.st_mode) try: if hasattr(os, 'utime'): os.utime(dst, (st.st_atime, st.st_mtime)) if hasattr(os, 'chmod'): os.chmod(dst, mode) except OSError, err: if WindowsError is not None and isinstance(err, WindowsError): pass elif ignore_permissions_err and err.errno == errno.EPERM: pass else: raise __________________________________ Tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue1545> __________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com