only consider readable files for import

This commit is contained in:
Axel Uhl committed 2013-04-19 00:54:26 +02:00
1 parent 9ba7da543f
commit 485b81f671
1 file changed
+1 -1
@@ -28,7 +28,7 @@ public class FileBasedResultDocumentProvider implements ResultDocumentProvider {
final File[] fileList = scanDir.listFiles();
if (fileList != null) {
for (File file : fileList) {
if (file.isFile() && !file.getName().startsWith(".")) {
if (file.isFile() && file.canRead() && !file.getName().startsWith(".")) {
logger.fine("adding " + file + " to result import list");
result.add(new Triple<InputStream, String, TimePoint>(new FileInputStream(file), file.toString(),
new MillisecondsTimePoint(file.lastModified())));