Author: davsclaus
Date: Wed Apr  7 08:46:05 2010
New Revision: 931466

URL: http://svn.apache.org/viewvc?rev=931466&view=rev
Log:
CAMEL-2621: File consumer polling from network share on Windows may ignore 
files as JDK says its not a file, even though its a file.

Modified:
    
camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java?rev=931466&r1=931465&r2=931466&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/FileConsumer.java
 Wed Apr  7 08:46:05 2010
@@ -64,7 +64,8 @@ public class FileConsumer extends Generi
                     String subDirectory = fileName + File.separator + 
file.getName();
                     pollDirectory(subDirectory, fileList);
                 }
-            } else if (file.isFile()) {
+            } else {
+                // Windows can report false to a file on a share so regard it 
always as a file (if its not a directory)
                 if (isValidFile(gf, false)) {
                     if (isInProgress(gf)) {
                         if (log.isTraceEnabled()) {
@@ -75,8 +76,6 @@ public class FileConsumer extends Generi
                         fileList.add(gf);
                     }
                 }
-            } else {
-                log.debug("Ignoring unsupported file type for file: " + file);
             }
         }
     }


Reply via email to