Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SFTP source - it creates a new folder (if doesn't exist) instead of throwing an exception #1345

Closed
mkralik3 opened this issue Mar 9, 2023 · 1 comment · Fixed by #1349
Closed
Assignees
Milestone

Comments

@mkralik3
Copy link

mkralik3 commented Mar 9, 2023

According to the description[1]

Whether to ignore when (trying to list files in directories or when downloading a file), which does not exist or due to permission error. By default when a directory or file does not exists or insufficient permission, then an exception is thrown. Setting this option to true allows to ignore that instead.

when the ignoreFileNotFoundOrPermissionError option is set to false (by default) and the folder (set in directoryName) doesn't exist, the connector should throw an exception.
However, if the folder doesn't exist, the connector creates it instead.

[1] - https://github.com/apache/camel-kamelets/blob/main/kamelets/sftp-source.kamelet.yaml#L89 / https://camel.apache.org/components/3.20.x/sftp-component.html#_endpoint_query_option_ignoreFileNotFoundOrPermissionError

@oscerd
Copy link
Contributor

oscerd commented Mar 9, 2023

This is related to: https://camel.apache.org/components/3.20.x/sftp-component.html#_endpoint_query_option_autoCreate
since autocreate is always true, the starting directory will be created.
To fix this we need to expose the parameter and make it configurable.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants