[ 
https://issues.apache.org/jira/browse/CAMEL-21891?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Andrea Bertolotto updated CAMEL-21891:
--------------------------------------
    Description: 
Based on modifications in SftpConsumer and FtpConsumer classes, with new 
getRelativeFilePath method, file names from root FTP folder are now returned as 
relative, so e.g. "/fileName.csv", instead of previous "fileName.csv". This 
change causes a regression in antInclude filters, not working anymore (maybe 
this is a desired breaking change, but undocumented).

Previous working antInclude parameter: "*" - get all files in root FTP directory

>From 4.10 and on, same parameter values matches no files

AntInclude parameter now follows previous behavior using: "/*" - all file names 
become relative

SftpConsumer#doPollDirectory -> GenericFileConsumer#isValidFile -> 
GenericFileConsumer#isMatched -> AntFilter#accept -> 
AntPathMatcherFileFilter#acceptPathName -> 
matcher.match(include, path, caseSensitive) skips now all files, starting with 
relative path "/"

  was:
Based on modifications in SftpConsumer and FtpConsumer classes, with new 
getRelativeFilePath method, file names from root FTP folder are now returned as 
relative, so e.g. "/fileName.csv", instead of previous "fileName.csv". This 
change causes a regression in antInclude filters, not working anymore (maybe 
this is a desired breaking change, but undocumented).

Previous working antInclude parameter: "*" - get all files in root FTP directory

>From 4.10 and on, same parameter values matches no files

AntInclude parameter now follows previous behavior using: "/*" - all file names 
become relatives

SftpConsumer#doPollDirectory -> GenericFileConsumer#isValidFile -> 
GenericFileConsumer#isMatched -> AntFilter#accept -> 
AntPathMatcherFileFilter#acceptPathName -> 
matcher.match(include, path, caseSensitive) skips now all files, starting with 
relative path "/"


> (S)ftpConsumer and antInclude regression
> ----------------------------------------
>
>                 Key: CAMEL-21891
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21891
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-ftp
>    Affects Versions: 4.10.0, 4.10.1, 4.10.2
>         Environment: Camel 4.10.x using SFTP route consumer with antInclude 
> parameter
>            Reporter: Andrea Bertolotto
>            Priority: Major
>
> Based on modifications in SftpConsumer and FtpConsumer classes, with new 
> getRelativeFilePath method, file names from root FTP folder are now returned 
> as relative, so e.g. "/fileName.csv", instead of previous "fileName.csv". 
> This change causes a regression in antInclude filters, not working anymore 
> (maybe this is a desired breaking change, but undocumented).
> Previous working antInclude parameter: "*" - get all files in root FTP 
> directory
> From 4.10 and on, same parameter values matches no files
> AntInclude parameter now follows previous behavior using: "/*" - all file 
> names become relative
> SftpConsumer#doPollDirectory -> GenericFileConsumer#isValidFile -> 
> GenericFileConsumer#isMatched -> AntFilter#accept -> 
> AntPathMatcherFileFilter#acceptPathName -> 
> matcher.match(include, path, caseSensitive) skips now all files, starting 
> with relative path "/"



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to