From 67387622fcd0139ee406ffad9d3bb7025c9d3801 Mon Sep 17 00:00:00 2001 From: Brett Johnson Date: Wed, 21 Jan 2015 16:15:09 -0800 Subject: [PATCH] Use LinkOption.NO_FOLLOW_LINKS when fetching BasicFileAttributes. --- src/com/google/enterprise/adaptor/fs/NioFileDelegate.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/com/google/enterprise/adaptor/fs/NioFileDelegate.java b/src/com/google/enterprise/adaptor/fs/NioFileDelegate.java index 5ec6da1..aeb626c 100644 --- a/src/com/google/enterprise/adaptor/fs/NioFileDelegate.java +++ b/src/com/google/enterprise/adaptor/fs/NioFileDelegate.java @@ -58,7 +58,8 @@ public boolean isHidden(Path doc) throws IOException { @Override public BasicFileAttributes readBasicAttributes(Path doc) throws IOException { - return Files.readAttributes(doc, BasicFileAttributes.class); + return Files.readAttributes(doc, BasicFileAttributes.class, + LinkOption.NOFOLLOW_LINKS); } @Override