Hi
Ah the unit test did cover it a little. There is a "a" sub folder. This is hard to spot. You should probably have added a longer folder name so its easier to see there is a difference. And use a different binary file so we know its not the wrong file that has been copied.
Med venlig hilsen
Claus Ibsen
......................................
Silverbullet
Skovsgårdsvænget 21
8362 Hørning
Tlf. +45 2962 7576
Web: www.silverbullet.dk
-----Original Message-----
From: Ryadh [mailto:magnetic.ganesh@gmail.com]
Sent: 20. juli 2008 03:56
To: camel-user@activemq.apache.org
Subject: RE: FTP component: Possible bug
Hi Claus,
I coded a failing unit test, looked around the code and found the problem;
looks like the pollDirectory() never climbs up to the parent directory when
it has finished its work.
I made also a patch (albeit a very modest one, containing just a single line
;) )
I've also created an issue here:
https://issues.apache.org/activemq/browse/CAMEL-738Ryadh
Claus Ibsen wrote:
>
> Hi Ryadh
>
> Thanks for sharing this. Please let us know your findings. The FTP
> component is in for some improvements in Camel 1.5, we have a few tickets
> on this already - but your finding hasn't been reported before.
>
> You can help by creating a junit test that demonstrates the bug; we prefer
> to have unit tests when fixing bugs.
>
> The existing unit tests in camel-ftp can be used for inspiration and they
> use a mock FTP library for easy unit testing.
>
> You are also welcome to create a ticket in our bug database so we wont
> forget this issue:
>
http://issues.apache.org/activemq/browse/CAMEL>
>
>
>
> Med venlig hilsen
>
> Claus Ibsen
> ......................................
> Silverbullet
> Skovsgårdsvænget 21
> 8362 Hørning
> Tlf. +45 2962 7576
> Web: www.silverbullet.dk
> -----Original Message-----
> From: Ryadh [mailto:magnetic.ganesh@gmail.com]
> Sent: 19. juli 2008 03:36
> To: camel-user@activemq.apache.org
> Subject: FTP component: Possible bug
>
>
> Hello all,
> Well after managing to get the ftp component to work, I stumbled on a
> possible bug
> The routes setup:
> =========================
> String ftpUrl = "ftp://guest@localhost:"
> + "21"
> + "/incoming?binary=true"
> +
> "&consumer.delay=10000&consumer.append=false&consumer.setNames=true";
> String fileUrl = "file:///c:/inputdir/?noop=true&autoCreate=true";
> from(ftpUrl).to(fileUrl);
> =========================
> the remote directory has the following layout
>
> dir1/file2.txt
> dir2/file3.txt
> file1.txt
> file4.txt
>
> in the local directory, here is how the results looks like
> dir1/file1.txt
> dir1/file2.txt
> dir1/file3.txt
> dir1/file4.txt
>
> all the files are now in the dir1 folder!
>
> I am taking a look at the sources to confirm my remarks,
> Ryadh.
> --
> View this message in context:
>
http://www.nabble.com/FTP-component%3A-Possible-bug-tp18540318s22882p18540318.html> Sent from the Camel - Users mailing list archive at Nabble.com.
>
>
>
--
View this message in context:
http://www.nabble.com/FTP-component%3A-Possible-bug-tp18540318s22882p18550626.htmlSent from the Camel - Users mailing list archive at Nabble.com.