manifoldcf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From min...@apache.org
Subject svn commit: r1492603 - /manifoldcf/branches/CONNECTORS-710/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
Date Thu, 13 Jun 2013 09:50:12 GMT
Author: minoru
Date: Thu Jun 13 09:50:12 2013
New Revision: 1492603

URL: http://svn.apache.org/r1492603
Log: (empty)

Modified:
    manifoldcf/branches/CONNECTORS-710/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java

Modified: manifoldcf/branches/CONNECTORS-710/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
URL: http://svn.apache.org/viewvc/manifoldcf/branches/CONNECTORS-710/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java?rev=1492603&r1=1492602&r2=1492603&view=diff
==============================================================================
--- manifoldcf/branches/CONNECTORS-710/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
(original)
+++ manifoldcf/branches/CONNECTORS-710/connectors/filesystem/connector/src/main/java/org/apache/manifoldcf/crawler/connectors/filesystem/FileConnector.java
Thu Jun 13 09:50:12 2013
@@ -263,7 +263,11 @@ public class FileConnector extends org.a
             // Get the file's modified date.
             long lastModified = file.lastModified();
             StringBuilder sb = new StringBuilder();
-            sb.append(new Long(lastModified).toString()).append(":").append(new Long(fileLength).toString()).append(":").append(filePathToUri);
+            if (filePathToUri)
+              sb.append("+");
+            else
+              sb.append("-");
+            sb.append(new Long(lastModified).toString()).append(":").append(new Long(fileLength).toString());
             rval[i] = sb.toString();
           }
           else
@@ -296,7 +300,9 @@ public class FileConnector extends org.a
     int i = 0;
     while (i < documentIdentifiers.length)
     {
-      File file = new File(documentIdentifiers[i]);
+      String version = versions[i];
+      String documentIdentifier = documentIdentifiers[i];
+      File file = new File(documentIdentifier);
       if (file.exists())
       {
         if (file.isDirectory())
@@ -305,7 +311,6 @@ public class FileConnector extends org.a
           long startTime = System.currentTimeMillis();
           String errorCode = "OK";
           String errorDesc = null;
-          String documentIdentifier = documentIdentifiers[i];
           String entityReference = documentIdentifier;
           try
           {
@@ -366,20 +371,13 @@ public class FileConnector extends org.a
                * get filepathtouri value
                */
               boolean filePathToUri = false;
-              j = 0;
-              while (j < spec.getChildCount()) {
-                SpecificationNode sn = spec.getChild(j++);
-                if (sn.getType().equals("filepathtouri")) {
-                  filePathToUri = Boolean.valueOf(sn.getValue());
-                }
-              }
+              if (version.length() > 0 && version.startsWith("+"))
+                filePathToUri = true;
               
               long startTime = System.currentTimeMillis();
               String errorCode = "OK";
               String errorDesc = null;
               Long fileLength = null;
-              String documentIdentifier = documentIdentifiers[i];
-              String version = versions[i];
               String entityDescription = documentIdentifier;
               try
               {



Mime
View raw message