[ 
https://issues.apache.org/activemq/browse/CAMEL-834?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=45040#action_45040
 ] 

Aleksandar Vidakovic commented on CAMEL-834:
--------------------------------------------

Actually I did test it against the latest Maven snapshots. Forgot to tell that. 
The problem with those was that the download didn't even start. For the moment 
I can't tell why.

> 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&amp;directory=true&amp;binary=true&amp;consumer.useFixedDelay=false&amp;consumer.setNames=true&amp;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&amp;directory=true&amp;binary=true&amp;consumer.useFixedDelay=false&amp;consumer.setNames=true&amp;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.

Reply via email to