]> granicus.if.org Git - python/commitdiff
Fix bug #345 reported by David Bolen <db3l@fitlinxx.com>:
authorFred Drake <fdrake@acm.org>
Sat, 1 Jul 2000 06:36:51 +0000 (06:36 +0000)
committerFred Drake <fdrake@acm.org>
Sat, 1 Jul 2000 06:36:51 +0000 (06:36 +0000)
getatime() returned the mtime instead of the atime.
Similar to an old bug in posixpath.py.

Lib/ntpath.py

index 51e60a2eddb32d81f773bfba7d49e33f2893224a..23b7ce3d4a8942cc6260ee95f2c9f08a72274af0 100644 (file)
@@ -183,7 +183,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]
 
 
 # Is a path a symbolic link?