mirror of
https://github.com/python/cpython.git
synced 2025-08-31 14:07:50 +00:00
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
2 changed files with 2 additions and 2 deletions
|
@ -131,7 +131,7 @@ def getmtime(filename):
|
||||||
def getatime(filename):
|
def getatime(filename):
|
||||||
"""Return the last access time of a file, reported by os.stat()."""
|
"""Return the last access time of a file, reported by os.stat()."""
|
||||||
st = os.stat(filename)
|
st = os.stat(filename)
|
||||||
return st[stat.ST_MTIME]
|
return st[stat.ST_ATIME]
|
||||||
|
|
||||||
|
|
||||||
def islink(path):
|
def islink(path):
|
||||||
|
|
|
@ -114,7 +114,7 @@ def getmtime(filename):
|
||||||
def getatime(filename):
|
def getatime(filename):
|
||||||
"""Return the last access time of a file, reported by os.stat()."""
|
"""Return the last access time of a file, reported by os.stat()."""
|
||||||
st = os.stat(filename)
|
st = os.stat(filename)
|
||||||
return st[ST_MTIME]
|
return st[ST_ATIME]
|
||||||
|
|
||||||
|
|
||||||
def islink(s):
|
def islink(s):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue