Fixing issue with last access time

Get the last access time is failing for folders so updating the adaptor to
use the last access time of the attributes for the folder.
diff --git a/src/com/google/enterprise/adaptor/fs/FsAdaptor.java b/src/com/google/enterprise/adaptor/fs/FsAdaptor.java
index 60343f9..7cf0cda 100644
--- a/src/com/google/enterprise/adaptor/fs/FsAdaptor.java
+++ b/src/com/google/enterprise/adaptor/fs/FsAdaptor.java
@@ -516,7 +516,16 @@
     }
 
     final boolean docIsDirectory = attrs.isDirectory();
-    final FileTime lastAccessTime = delegate.getLastAccessTime(doc);
+
+    // It is possible that BasicFileAttribtues.lastAccessTime uses a cached
+    // version of the last access time so it's really not ideal to use with
+    // files since the adaptor attempts to protect the last access time for
+    // files from changing. Additionally, delegate.getLastAccessTime has the
+    // limitation that it only works for files. So for folders use
+    // BasicFileAttribtues.lastAccessTime and for files use
+    // delegate.getLastAccessTime.
+    final FileTime lastAccessTime = docIsDirectory ?
+      attrs.lastAccessTime() : delegate.getLastAccessTime(doc);
 
     if (!docIsDirectory) {
       if (lastAccessTimeFilter.excluded(lastAccessTime)) {