omarsmak commented on a change in pull request #4573: URL: https://github.com/apache/camel/pull/4573#discussion_r518826641
########## File path: components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileDefaultMoveExistingFileStrategy.java ########## @@ -49,14 +49,24 @@ public boolean moveExistingFile(GenericFileEndpoint endpoint, GenericFileOperati dummy.getIn().setHeader(Exchange.FILE_PARENT, parent); String to = endpoint.getMoveExisting().evaluate(dummy, String.class); - // we must normalize it (to avoid having both \ and / in the name which - // confuses java.io.File) - to = FileUtil.normalizePath(to); + if (ObjectHelper.isEmpty(to)) { throw new GenericFileOperationFailedException( "moveExisting evaluated as empty String, cannot move existing file: " + fileName); } + if (to.length() > 1 && to.endsWith("/")) { Review comment: By creating a singleton utility class in the component perhaps? ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org