Trailing slash missing in SftpConsumer
--------------------------------------
Key: CAMEL-834
URL: https://issues.apache.org/activemq/browse/CAMEL-834
Project: Apache Camel
Issue Type: Bug
Components: camel-ftp
Affects Versions: 1.4.0
Environment: Windows Vista Business, JDK 1.6.0_05
Reporter: Aleksandar Vidakovic
When this route
{code}
<camel:route>
<camel:from uri="sftp://[EMAIL
PROTECTED]/path/to/directory/?password=secret&directory=true&binary=true&consumer.useFixedDelay=false&consumer.setNames=true&consumer.recursive=false"
/>
<camel:to uri="file:///C:/camel/output/" />
</camel:route>
{code}
is configured the files in the remote directory are download, but subsequent
calls of the method "pollDir" result in this exception:
{code}
[ Thread: 1 RemoteFileComponent] SftpConsumer WARN Caught
SftpException:2: No such file
[ Thread: 1 RemoteFileComponent] SftpConsumer WARN Doing
nothing for now, need to determine an appropriate action
[ Thread: 1 RemoteFileComponent] ScheduledPollConsumer WARN An
exception occured while polling: Endpoint[sftp://[EMAIL
PROTECTED]/path/to/directory/?password=secret&directory=true&binary=true&consumer.useFixedDelay=false&consumer.setNames=true&consumer.recursive=false]:
No such file 2: No such file
{code}
As you can see the slash is definitely in the configured route. If I check for
the missing slash and add it to the dir variable (line 115 in SftpConsumer)
then the consumer works:
{code}
if(!dir.startsWith("/")) {
dir = "/" + dir;
}
{code}
Didn't have the time to have a closer look. The root cause of the missing slash
is somewhere else.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.