]> granicus.if.org Git - python/commitdiff
getatime() returned the mtime instead of the atime.
authorGuido van Rossum <guido@python.org>
Sat, 1 Jul 2000 10:52:49 +0000 (10:52 +0000)
committerGuido van Rossum <guido@python.org>
Sat, 1 Jul 2000 10:52:49 +0000 (10:52 +0000)
Similar to an old bug in ntpath.py.

Lib/dospath.py
Lib/macpath.py

index 4e4be5651889b626a7891726f708a575d70ee4c7..98efe6751f5c26eaf90267779f4ed7d34c0267da 100644 (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):
index 3e36f79dd8998e27e8febafa308a5ec24de0813f..464bdd0f55c7a9313f63ac066b8ad0e95a638262 100644 (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):