getatime() returned the mtime instead of the atime.

Similar to an old bug in ntpath.py.
This commit is contained in:
Guido van Rossum 2000-07-01 10:52:49 +00:00
parent 9e94afd18d
commit 46d565111e
2 changed files with 2 additions and 2 deletions

View File

@ -131,7 +131,7 @@ def getmtime(filename):
def getatime(filename):
"""Return the last access time of a file, reported by os.stat()."""
st = os.stat(filename)
return st[stat.ST_MTIME]
return st[stat.ST_ATIME]
def islink(path):

View File

@ -114,7 +114,7 @@ def getmtime(filename):
def getatime(filename):
"""Return the last access time of a file, reported by os.stat()."""
st = os.stat(filename)
return st[ST_MTIME]
return st[ST_ATIME]
def islink(s):