You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@manifoldcf.apache.org by kw...@apache.org on 2014/07/17 02:50:15 UTC
svn commit: r1611230 -
/manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
Author: kwright
Date: Thu Jul 17 00:50:14 2014
New Revision: 1611230
URL: http://svn.apache.org/r1611230
Log:
Chained connectors always scan parent nodes
Modified:
manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
Modified: manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java?rev=1611230&r1=1611229&r2=1611230&view=diff
==============================================================================
--- manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java (original)
+++ manifoldcf/trunk/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java Thu Jul 17 00:50:14 2014
@@ -290,43 +290,40 @@ public class FileConnector extends org.a
{
if (file.isDirectory())
{
- if (!scanOnly[i])
+ // Chained connectors scan parent nodes always
+ // Queue up stuff for directory
+ long startTime = System.currentTimeMillis();
+ String errorCode = "OK";
+ String errorDesc = null;
+ String entityReference = documentIdentifier;
+ try
{
- activities.noDocument(documentIdentifier,version);
- // Queue up stuff for directory
- long startTime = System.currentTimeMillis();
- String errorCode = "OK";
- String errorDesc = null;
- String entityReference = documentIdentifier;
try
{
- try
+ File[] files = file.listFiles();
+ if (files != null)
{
- File[] files = file.listFiles();
- if (files != null)
+ int j = 0;
+ while (j < files.length)
{
- int j = 0;
- while (j < files.length)
- {
- File f = files[j++];
- String canonicalPath = f.getCanonicalPath();
- if (checkInclude(f,canonicalPath,spec))
- activities.addDocumentReference(canonicalPath,documentIdentifier,RELATIONSHIP_CHILD);
- }
+ File f = files[j++];
+ String canonicalPath = f.getCanonicalPath();
+ if (checkInclude(f,canonicalPath,spec))
+ activities.addDocumentReference(canonicalPath,documentIdentifier,RELATIONSHIP_CHILD);
}
}
- catch (IOException e)
- {
- errorCode = "IO ERROR";
- errorDesc = e.getMessage();
- throw new ManifoldCFException("IO Error: "+e.getMessage(),e);
- }
}
- finally
+ catch (IOException e)
{
- activities.recordActivity(new Long(startTime),ACTIVITY_READ,null,entityReference,errorCode,errorDesc,null);
+ errorCode = "IO ERROR";
+ errorDesc = e.getMessage();
+ throw new ManifoldCFException("IO Error: "+e.getMessage(),e);
}
}
+ finally
+ {
+ activities.recordActivity(new Long(startTime),ACTIVITY_READ,null,entityReference,errorCode,errorDesc,null);
+ }
}
else
{