getatime() returned the mtime instead of the atime.
Similar to an old bug in ntpath.py.
This commit is contained in:
parent
9e94afd18d
commit
46d565111e
|
@ -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):
|
||||
|
|
|
@ -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):
|
||||
|
|
Loading…
Reference in New Issue