Merged revisions 67717 via svnmerge from

svn+ssh://pythondev@svn.python.org/python/trunk

........
  r67717 | lars.gustaebel | 2008-12-12 14:58:03 +0100 (Fri, 12 Dec 2008) | 2 lines

  Issue #4616: TarFile.utime(): Restore directory times on Windows.
........
This commit is contained in:
Lars Gustäbel 2008-12-12 14:14:42 +00:00
parent 717d5d0a50
commit 696d6ba6b9
3 changed files with 5 additions and 10 deletions

View file

@ -2284,10 +2284,6 @@ class TarFile(object):
"""
if not hasattr(os, 'utime'):
return
if sys.platform == "win32" and tarinfo.isdir():
# According to msdn.microsoft.com, it is an error (EACCES)
# to use utime() on directories.
return
try:
os.utime(targetpath, (tarinfo.mtime, tarinfo.mtime))
except EnvironmentError, e: