You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2013/11/21 13:56:29 UTC
[06/10] git commit: CAMEL-6936: Fixed file/ftp consumer when
idempotent=true may not detect file changed as new file,
due the file was regarded as still in-progress.
CAMEL-6936: Fixed file/ftp consumer when idempotent=true may not detect file changed as new file, due the file was regarded as still in-progress.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/7432d6ea
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/7432d6ea
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/7432d6ea
Branch: refs/heads/camel-2.11.x
Commit: 7432d6ea48357c296b642fa0acc54baab075d2ac
Parents: 2aa4be9
Author: Claus Ibsen <da...@apache.org>
Authored: Thu Nov 21 12:24:02 2013 +0100
Committer: Claus Ibsen <da...@apache.org>
Committed: Thu Nov 21 12:24:02 2013 +0100
----------------------------------------------------------------------
.../org/apache/camel/component/file/GenericFileConsumer.java | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/camel/blob/7432d6ea/camel-core/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java
index 50e7657..a32d001 100644
--- a/camel-core/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java
+++ b/camel-core/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java
@@ -447,7 +447,13 @@ public abstract class GenericFileConsumer<T> extends ScheduledBatchPollingConsum
// okay so final step is to be able to add atomic as in-progress, so we are the
// only thread processing this file
- return endpoint.getInProgressRepository().add(absoluteFilePath);
+ if (!isDirectory) {
+ // do not add directories as in-progress
+ return endpoint.getInProgressRepository().add(absoluteFilePath);
+ } else {
+ // .. a directory is always valid at this step
+ return true;
+ }
}
/**