You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@camel.apache.org by "Olivier Cheslet (JIRA)" <ji...@apache.org> on 2011/09/12 15:41:08 UTC
[jira] [Created] (CAMEL-4444) Wrong slash in FTP component for
doneFile
Wrong slash in FTP component for doneFile
-----------------------------------------
Key: CAMEL-4444
URL: https://issues.apache.org/jira/browse/CAMEL-4444
Project: Camel
Issue Type: Bug
Components: camel-ftp
Affects Versions: 2.8.0
Reporter: Olivier Cheslet
I tried to use the doneFile with FTP component.
When I used it to my FTP on my windows machine everything goes fine.
When I tried to act the same with a FTP host on a Linux machine, I got an issue.
I sniff the packet to see what goes wrong and I see this :
the doneFile
DELE public/Test/in\myFile.txt
the file to process
DELE public/Test/in/myFile.xml
After a Quick look on the code:
org.apache.camel.component.file.GenericFileEndpoint
line 682
String answer = pattern;
if (ObjectHelper.isNotEmpty(path) && ObjectHelper.isNotEmpty(pattern)) {
// done file must always be in same directory as the real file name
answer = path + File.separator + pattern;
}
if (getConfiguration().needToNormalize()) {
// must normalize path to cater for Windows and other OS
answer = FileUtil.normalizePath(answer);
}
We use the "File.Separator" but in this case, it should get a kind of "FTP.Separator" or the FTP component should return true to the needToNormalize method and change the narmalizePath method to manage this case.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-4444) Wrong slash in FTP component for
doneFile
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13103455#comment-13103455 ]
Claus Ibsen commented on CAMEL-4444:
------------------------------------
There is a {{separator}} option you can use to explicit configure the separator style.
> Wrong slash in FTP component for doneFile
> -----------------------------------------
>
> Key: CAMEL-4444
> URL: https://issues.apache.org/jira/browse/CAMEL-4444
> Project: Camel
> Issue Type: Bug
> Components: camel-ftp
> Affects Versions: 2.8.0
> Reporter: Olivier Cheslet
>
> I tried to use the doneFile with FTP component.
> When I used it to my FTP on my windows machine everything goes fine.
> When I tried to act the same with a FTP host on a Linux machine, I got an issue.
> I sniff the packet to see what goes wrong and I see this :
> the doneFile
> DELE public/Test/in\myFile.txt
> the file to process
> DELE public/Test/in/myFile.xml
> After a Quick look on the code:
> org.apache.camel.component.file.GenericFileEndpoint
> line 682
> String answer = pattern;
> if (ObjectHelper.isNotEmpty(path) && ObjectHelper.isNotEmpty(pattern)) {
> // done file must always be in same directory as the real file name
> answer = path + File.separator + pattern;
> }
> if (getConfiguration().needToNormalize()) {
> // must normalize path to cater for Windows and other OS
> answer = FileUtil.normalizePath(answer);
> }
> We use the "File.Separator" but in this case, it should get a kind of "FTP.Separator" or the FTP component should return true to the needToNormalize method and change the narmalizePath method to manage this case.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CAMEL-4444) Wrong slash in FTP component for
doneFile
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen updated CAMEL-4444:
-------------------------------
Fix Version/s: 2.9.0
2.8.2
> Wrong slash in FTP component for doneFile
> -----------------------------------------
>
> Key: CAMEL-4444
> URL: https://issues.apache.org/jira/browse/CAMEL-4444
> Project: Camel
> Issue Type: Bug
> Components: camel-ftp
> Affects Versions: 2.8.0
> Reporter: Olivier Cheslet
> Assignee: Claus Ibsen
> Fix For: 2.8.2, 2.9.0
>
> Attachments: CAMEL-4444.patch
>
>
> I tried to use the doneFile with FTP component.
> When I used it to my FTP on my windows machine everything goes fine.
> When I tried to act the same with a FTP host on a Linux machine, I got an issue.
> I sniff the packet to see what goes wrong and I see this :
> the doneFile
> DELE public/Test/in\myFile.txt
> the file to process
> DELE public/Test/in/myFile.xml
> After a Quick look on the code:
> org.apache.camel.component.file.GenericFileEndpoint
> line 682
> String answer = pattern;
> if (ObjectHelper.isNotEmpty(path) && ObjectHelper.isNotEmpty(pattern)) {
> // done file must always be in same directory as the real file name
> answer = path + File.separator + pattern;
> }
> if (getConfiguration().needToNormalize()) {
> // must normalize path to cater for Windows and other OS
> answer = FileUtil.normalizePath(answer);
> }
> We use the "File.Separator" but in this case, it should get a kind of "FTP.Separator" or the FTP component should return true to the needToNormalize method and change the narmalizePath method to manage this case.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Resolved] (CAMEL-4444) Wrong slash in FTP component for
doneFile
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen resolved CAMEL-4444.
--------------------------------
Resolution: Fixed
Thanks for the patch
> Wrong slash in FTP component for doneFile
> -----------------------------------------
>
> Key: CAMEL-4444
> URL: https://issues.apache.org/jira/browse/CAMEL-4444
> Project: Camel
> Issue Type: Bug
> Components: camel-ftp
> Affects Versions: 2.8.0
> Reporter: Olivier Cheslet
> Assignee: Claus Ibsen
> Fix For: 2.8.2, 2.9.0
>
> Attachments: CAMEL-4444.patch, CAMEL-4444.patch
>
>
> I tried to use the doneFile with FTP component.
> When I used it to my FTP on my windows machine everything goes fine.
> When I tried to act the same with a FTP host on a Linux machine, I got an issue.
> I sniff the packet to see what goes wrong and I see this :
> the doneFile
> DELE public/Test/in\myFile.txt
> the file to process
> DELE public/Test/in/myFile.xml
> After a Quick look on the code:
> org.apache.camel.component.file.GenericFileEndpoint
> line 682
> String answer = pattern;
> if (ObjectHelper.isNotEmpty(path) && ObjectHelper.isNotEmpty(pattern)) {
> // done file must always be in same directory as the real file name
> answer = path + File.separator + pattern;
> }
> if (getConfiguration().needToNormalize()) {
> // must normalize path to cater for Windows and other OS
> answer = FileUtil.normalizePath(answer);
> }
> We use the "File.Separator" but in this case, it should get a kind of "FTP.Separator" or the FTP component should return true to the needToNormalize method and change the narmalizePath method to manage this case.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Issue Comment Edited] (CAMEL-4444) Wrong slash in FTP
component for doneFile
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13103525#comment-13103525 ]
Claus Ibsen edited comment on CAMEL-4444 at 9/13/11 11:31 AM:
--------------------------------------------------------------
Olivier can you re-attach the patch and this time make sure to [x] in Grant license to Apache, as we cannot accept patches otherwise.
was (Author: davsclaus):
Oliver can you re-attach the patch and this time make sure to [x] in Grant license to Apache, as we cannot accept patches otherwise.
> Wrong slash in FTP component for doneFile
> -----------------------------------------
>
> Key: CAMEL-4444
> URL: https://issues.apache.org/jira/browse/CAMEL-4444
> Project: Camel
> Issue Type: Bug
> Components: camel-ftp
> Affects Versions: 2.8.0
> Reporter: Olivier Cheslet
> Assignee: Claus Ibsen
> Fix For: 2.8.2, 2.9.0
>
> Attachments: CAMEL-4444.patch, CAMEL-4444.patch
>
>
> I tried to use the doneFile with FTP component.
> When I used it to my FTP on my windows machine everything goes fine.
> When I tried to act the same with a FTP host on a Linux machine, I got an issue.
> I sniff the packet to see what goes wrong and I see this :
> the doneFile
> DELE public/Test/in\myFile.txt
> the file to process
> DELE public/Test/in/myFile.xml
> After a Quick look on the code:
> org.apache.camel.component.file.GenericFileEndpoint
> line 682
> String answer = pattern;
> if (ObjectHelper.isNotEmpty(path) && ObjectHelper.isNotEmpty(pattern)) {
> // done file must always be in same directory as the real file name
> answer = path + File.separator + pattern;
> }
> if (getConfiguration().needToNormalize()) {
> // must normalize path to cater for Windows and other OS
> answer = FileUtil.normalizePath(answer);
> }
> We use the "File.Separator" but in this case, it should get a kind of "FTP.Separator" or the FTP component should return true to the needToNormalize method and change the narmalizePath method to manage this case.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-4444) Wrong slash in FTP component for
doneFile
Posted by "Olivier Cheslet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13103493#comment-13103493 ]
Olivier Cheslet commented on CAMEL-4444:
----------------------------------------
Thanks,
I think the last thing to fix, it's to replace the
File.separator on line 685 of the org.apache.camel.component.file.GenericFileEndpoint class by getFileSeparator()
and it will be fine.
> Wrong slash in FTP component for doneFile
> -----------------------------------------
>
> Key: CAMEL-4444
> URL: https://issues.apache.org/jira/browse/CAMEL-4444
> Project: Camel
> Issue Type: Bug
> Components: camel-ftp
> Affects Versions: 2.8.0
> Reporter: Olivier Cheslet
> Assignee: Claus Ibsen
>
> I tried to use the doneFile with FTP component.
> When I used it to my FTP on my windows machine everything goes fine.
> When I tried to act the same with a FTP host on a Linux machine, I got an issue.
> I sniff the packet to see what goes wrong and I see this :
> the doneFile
> DELE public/Test/in\myFile.txt
> the file to process
> DELE public/Test/in/myFile.xml
> After a Quick look on the code:
> org.apache.camel.component.file.GenericFileEndpoint
> line 682
> String answer = pattern;
> if (ObjectHelper.isNotEmpty(path) && ObjectHelper.isNotEmpty(pattern)) {
> // done file must always be in same directory as the real file name
> answer = path + File.separator + pattern;
> }
> if (getConfiguration().needToNormalize()) {
> // must normalize path to cater for Windows and other OS
> answer = FileUtil.normalizePath(answer);
> }
> We use the "File.Separator" but in this case, it should get a kind of "FTP.Separator" or the FTP component should return true to the needToNormalize method and change the narmalizePath method to manage this case.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CAMEL-4444) Wrong slash in FTP component for
doneFile
Posted by "Olivier Cheslet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olivier Cheslet updated CAMEL-4444:
-----------------------------------
Attachment: CAMEL-4444.patch
Here is a potential patch
> Wrong slash in FTP component for doneFile
> -----------------------------------------
>
> Key: CAMEL-4444
> URL: https://issues.apache.org/jira/browse/CAMEL-4444
> Project: Camel
> Issue Type: Bug
> Components: camel-ftp
> Affects Versions: 2.8.0
> Reporter: Olivier Cheslet
> Assignee: Claus Ibsen
> Attachments: CAMEL-4444.patch
>
>
> I tried to use the doneFile with FTP component.
> When I used it to my FTP on my windows machine everything goes fine.
> When I tried to act the same with a FTP host on a Linux machine, I got an issue.
> I sniff the packet to see what goes wrong and I see this :
> the doneFile
> DELE public/Test/in\myFile.txt
> the file to process
> DELE public/Test/in/myFile.xml
> After a Quick look on the code:
> org.apache.camel.component.file.GenericFileEndpoint
> line 682
> String answer = pattern;
> if (ObjectHelper.isNotEmpty(path) && ObjectHelper.isNotEmpty(pattern)) {
> // done file must always be in same directory as the real file name
> answer = path + File.separator + pattern;
> }
> if (getConfiguration().needToNormalize()) {
> // must normalize path to cater for Windows and other OS
> answer = FileUtil.normalizePath(answer);
> }
> We use the "File.Separator" but in this case, it should get a kind of "FTP.Separator" or the FTP component should return true to the needToNormalize method and change the narmalizePath method to manage this case.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Updated] (CAMEL-4444) Wrong slash in FTP component for
doneFile
Posted by "Olivier Cheslet (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Olivier Cheslet updated CAMEL-4444:
-----------------------------------
Attachment: CAMEL-4444.patch
> Wrong slash in FTP component for doneFile
> -----------------------------------------
>
> Key: CAMEL-4444
> URL: https://issues.apache.org/jira/browse/CAMEL-4444
> Project: Camel
> Issue Type: Bug
> Components: camel-ftp
> Affects Versions: 2.8.0
> Reporter: Olivier Cheslet
> Assignee: Claus Ibsen
> Fix For: 2.8.2, 2.9.0
>
> Attachments: CAMEL-4444.patch, CAMEL-4444.patch
>
>
> I tried to use the doneFile with FTP component.
> When I used it to my FTP on my windows machine everything goes fine.
> When I tried to act the same with a FTP host on a Linux machine, I got an issue.
> I sniff the packet to see what goes wrong and I see this :
> the doneFile
> DELE public/Test/in\myFile.txt
> the file to process
> DELE public/Test/in/myFile.xml
> After a Quick look on the code:
> org.apache.camel.component.file.GenericFileEndpoint
> line 682
> String answer = pattern;
> if (ObjectHelper.isNotEmpty(path) && ObjectHelper.isNotEmpty(pattern)) {
> // done file must always be in same directory as the real file name
> answer = path + File.separator + pattern;
> }
> if (getConfiguration().needToNormalize()) {
> // must normalize path to cater for Windows and other OS
> answer = FileUtil.normalizePath(answer);
> }
> We use the "File.Separator" but in this case, it should get a kind of "FTP.Separator" or the FTP component should return true to the needToNormalize method and change the narmalizePath method to manage this case.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Commented] (CAMEL-4444) Wrong slash in FTP component for
doneFile
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4444?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13103525#comment-13103525 ]
Claus Ibsen commented on CAMEL-4444:
------------------------------------
Oliver can you re-attach the patch and this time make sure to [x] in Grant license to Apache, as we cannot accept patches otherwise.
> Wrong slash in FTP component for doneFile
> -----------------------------------------
>
> Key: CAMEL-4444
> URL: https://issues.apache.org/jira/browse/CAMEL-4444
> Project: Camel
> Issue Type: Bug
> Components: camel-ftp
> Affects Versions: 2.8.0
> Reporter: Olivier Cheslet
> Assignee: Claus Ibsen
> Fix For: 2.8.2, 2.9.0
>
> Attachments: CAMEL-4444.patch
>
>
> I tried to use the doneFile with FTP component.
> When I used it to my FTP on my windows machine everything goes fine.
> When I tried to act the same with a FTP host on a Linux machine, I got an issue.
> I sniff the packet to see what goes wrong and I see this :
> the doneFile
> DELE public/Test/in\myFile.txt
> the file to process
> DELE public/Test/in/myFile.xml
> After a Quick look on the code:
> org.apache.camel.component.file.GenericFileEndpoint
> line 682
> String answer = pattern;
> if (ObjectHelper.isNotEmpty(path) && ObjectHelper.isNotEmpty(pattern)) {
> // done file must always be in same directory as the real file name
> answer = path + File.separator + pattern;
> }
> if (getConfiguration().needToNormalize()) {
> // must normalize path to cater for Windows and other OS
> answer = FileUtil.normalizePath(answer);
> }
> We use the "File.Separator" but in this case, it should get a kind of "FTP.Separator" or the FTP component should return true to the needToNormalize method and change the narmalizePath method to manage this case.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira
[jira] [Assigned] (CAMEL-4444) Wrong slash in FTP component for
doneFile
Posted by "Claus Ibsen (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/CAMEL-4444?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Claus Ibsen reassigned CAMEL-4444:
----------------------------------
Assignee: Claus Ibsen
> Wrong slash in FTP component for doneFile
> -----------------------------------------
>
> Key: CAMEL-4444
> URL: https://issues.apache.org/jira/browse/CAMEL-4444
> Project: Camel
> Issue Type: Bug
> Components: camel-ftp
> Affects Versions: 2.8.0
> Reporter: Olivier Cheslet
> Assignee: Claus Ibsen
>
> I tried to use the doneFile with FTP component.
> When I used it to my FTP on my windows machine everything goes fine.
> When I tried to act the same with a FTP host on a Linux machine, I got an issue.
> I sniff the packet to see what goes wrong and I see this :
> the doneFile
> DELE public/Test/in\myFile.txt
> the file to process
> DELE public/Test/in/myFile.xml
> After a Quick look on the code:
> org.apache.camel.component.file.GenericFileEndpoint
> line 682
> String answer = pattern;
> if (ObjectHelper.isNotEmpty(path) && ObjectHelper.isNotEmpty(pattern)) {
> // done file must always be in same directory as the real file name
> answer = path + File.separator + pattern;
> }
> if (getConfiguration().needToNormalize()) {
> // must normalize path to cater for Windows and other OS
> answer = FileUtil.normalizePath(answer);
> }
> We use the "File.Separator" but in this case, it should get a kind of "FTP.Separator" or the FTP component should return true to the needToNormalize method and change the narmalizePath method to manage this case.
--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira