Author: kwright
Date: Tue Nov 19 02:32:50 2013
New Revision: 1543291
URL: http://svn.apache.org/r1543291
Log:
Tentative fix for CONNECTORS-812.
Modified:
manifoldcf/trunk/CHANGES.txt
manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
Modified: manifoldcf/trunk/CHANGES.txt
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/CHANGES.txt?rev=1543291&r1=1543290&r2=1543291&view=diff
==============================================================================
--- manifoldcf/trunk/CHANGES.txt (original)
+++ manifoldcf/trunk/CHANGES.txt Tue Nov 19 02:32:50 2013
@@ -3,6 +3,12 @@ $Id$
======================= 1.5-dev =====================
+CONNECTORS-812: SharePoint connector needs to ignore constructs
+that it doesn't understand when enumerating list contents, because
+under some configurations, SharePoint lists things that aren't list items
+there.
+(Mark Libucha, Karl Wright)
+
CONNECTORS-810: Update JDBC connector documentation, and add
documentation for the JDBC authority connector.
(Karl Wright)
Modified:
manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
URL:
http://svn.apache.org/viewvc/manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java?rev=1543291&r1=1543290&r2=1543291&view=diff
==============================================================================
---
manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
(original)
+++
manifoldcf/trunk/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
Tue Nov 19 02:32:50 2013
@@ -2250,25 +2250,30 @@ public class SharePointRepository extend
{
relPath = relPath.substring(sitePath.length());
- // Now, strip "Lists" from relPath
- if (!relPath.startsWith("/Lists/"))
- throw new ManifoldCFException("Expected path to start with
/Lists/");
- relPath = sitePath + relPath.substring("/Lists".length());
- if ( checkIncludeListItem( relPath, spec ) )
+ // Now, strip "Lists" from relPath. If it doesn't start with
/Lists/, ignore it.
+ if (relPath.startsWith("/Lists/"))
{
- if (relPath.startsWith(siteListPath))
+ relPath = sitePath + relPath.substring("/Lists".length());
+ if ( checkIncludeListItem( relPath, spec ) )
{
- // Since the processing for a item needs to know the list path,
we need a way to signal the cutoff between list and item levels.
- // The way I've chosen to do this is to use a triple slash at
that point, as a separator.
- String modifiedPath = relPath.substring(0,siteListPath.length())
+ "//" + relPath.substring(siteListPath.length());
-
- activities.addDocumentReference( modifiedPath,
documentIdentifier, null, listItemStreamDataNames, dataValues );
- }
- else
- {
- Logging.connectors.warn("SharePoint: Unexpected relPath
structure; site path is '"+relPath+"', but expected to see something beginning
with '"+siteListPath+"'");
+ if (relPath.startsWith(siteListPath))
+ {
+ // Since the processing for a item needs to know the list
path, we need a way to signal the cutoff between list and item levels.
+ // The way I've chosen to do this is to use a triple slash at
that point, as a separator.
+ String modifiedPath =
relPath.substring(0,siteListPath.length()) + "//" +
relPath.substring(siteListPath.length());
+
+ activities.addDocumentReference( modifiedPath,
documentIdentifier, null, listItemStreamDataNames, dataValues );
+ }
+ else
+ {
+ Logging.connectors.warn("SharePoint: Unexpected relPath
structure; site path is '"+relPath+"', but expected to see something beginning
with '"+siteListPath+"'");
+ }
}
}
+ else
+ {
+ Logging.connectors.warn("SharePoint: Unexpected relPath structure;
rel path is '"+relPath+"', but expected to see something beginning with
'/Lists/'");
+ }
}
else
{