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 2012/08/08 01:51:33 UTC

svn commit: r1370595 - /manifoldcf/branches/CONNECTORS-497/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java

Author: kwright
Date: Tue Aug  7 23:51:32 2012
New Revision: 1370595

URL: http://svn.apache.org/viewvc?rev=1370595&view=rev
Log:
Strip off /Lists prefix on all list items

Modified:
    manifoldcf/branches/CONNECTORS-497/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java

Modified: manifoldcf/branches/CONNECTORS-497/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-497/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java?rev=1370595&r1=1370594&r2=1370595&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-497/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java (original)
+++ manifoldcf/branches/CONNECTORS-497/connectors/sharepoint/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/sharepoint/SharePointRepository.java Tue Aug  7 23:51:32 2012
@@ -1829,9 +1829,13 @@ public class SharePointRepository extend
     public void addFile(String relPath)
       throws ManifoldCFException
     {
+      // First, strip "Lists" from relPath
+      if (!relPath.startsWith("/Lists/"))
+        throw new ManifoldCFException("Expected path to start with /Lists/");
+      relPath = relPath.substring("/Lists".length());
       if ( checkIncludeListItem( relPath, spec ) )
       {
-        // Since the processing for a file needs to know the library path, we need a way to signal the cutoff between list and item levels.
+        // 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,foldersFilePathIndex) + "//" + relPath.substring(foldersFilePathIndex);