You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Claus Ibsen (Jira)" <ji...@apache.org> on 2020/09/17 04:46:00 UTC

[jira] [Commented] (CAMEL-15540) SFTP as producer with options delete=true and recursive=true should also delete directories

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

Claus Ibsen commented on CAMEL-15540:
-------------------------------------

This has never been the case, the file component doesnt delete directories either. House cleaning like this is the job of the host of the FTP server. They can have a script that runs through their file system and remove empty directories that they run periodically.

Its too complex and surprising if Camel starts playing such role. Its there for picking up files.

> SFTP as producer with options delete=true and recursive=true should also delete directories
> -------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-15540
>                 URL: https://issues.apache.org/jira/browse/CAMEL-15540
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-ftp, camel-sftp
>            Reporter: Michael Jensen Garde
>            Priority: Minor
>
> I made a small route
>  
> {code:java}
> from("sftp://...").to("ftp://...")
> {code}
> which downloads a lot of files recursively. This results in a lot of empty directories, that i have to clean up manually afterwards. In my opinion, this behavior could be improved by deleting directories, when all files within it have been downloaded.
> I acknowledge that there are some grey zones.
>  * What if directories are initially empty? They should probably not get deleted, as they have not been "flagged" as having downloadable content.
> I'm just throwing a ball in the air here, because i feel the current functionality seems - inconvenient.
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)