This is an automated email from the ASF dual-hosted git repository.
klease pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push:
new eeb3145 CAMEL-17651: fix bug in reload strategy fileFilter introduced
by PR #6956. The filter needs the filename not the path.
eeb3145 is described below
commit eeb3145ff54ced45697f580b72f1ba5346c56979
Author: klease <[email protected]>
AuthorDate: Wed Feb 16 17:06:58 2022 +0100
CAMEL-17651: fix bug in reload strategy fileFilter introduced by PR #6956.
The filter needs the filename not the path.
---
.../main/java/org/apache/camel/support/RouteWatcherReloadStrategy.java | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git
a/core/camel-support/src/main/java/org/apache/camel/support/RouteWatcherReloadStrategy.java
b/core/camel-support/src/main/java/org/apache/camel/support/RouteWatcherReloadStrategy.java
index 53d1920..08400fb 100644
---
a/core/camel-support/src/main/java/org/apache/camel/support/RouteWatcherReloadStrategy.java
+++
b/core/camel-support/src/main/java/org/apache/camel/support/RouteWatcherReloadStrategy.java
@@ -114,9 +114,8 @@ public class RouteWatcherReloadStrategy extends
FileWatcherResourceReloadStrateg
// strip starting directory, so we have a relative name to
the starting folder
String path = f.getAbsolutePath();
if (path.startsWith(base)) {
- path = FileUtil.onlyPath(path);
+ path = FileUtil.stripPath(path);
}
- path = FileUtil.stripLeadingSeparator(path);
boolean result = matcher.match(part, path, false);
LOG.trace("Accepting file pattern:{} path:{} -> {}", part,
path, result);