camel-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen (Assigned) (JIRA)" <j...@apache.org>
Subject [jira] [Assigned] (CAMEL-4505) FileUtils change to make 'copy/delete instead of renaming' feature configurable
Date Sat, 01 Oct 2011 15:21:33 GMT

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

Claus Ibsen reassigned CAMEL-4505:
----------------------------------

    Assignee: Claus Ibsen
    
> FileUtils change to make 'copy/delete instead of renaming' feature configurable
> -------------------------------------------------------------------------------
>
>                 Key: CAMEL-4505
>                 URL: https://issues.apache.org/jira/browse/CAMEL-4505
>             Project: Camel
>          Issue Type: Improvement
>            Reporter: Maria Iracheta
>            Assignee: Claus Ibsen
>
> It would be nice to make the enhancement in the FileUtils 'renameFile' method configurable.
Not long ago the 'renameFile' method was changed to try copy/delete after 3 tries of renaming
a File. In certain cases you would want the renaming to fail as a way of knowing that the
File is opened or being used, otherwise it might cause the file to be copied and not deleted
(because it is opened).
> Apart of this enhancement request I think there is a bug in that area:
>     
>                 if (!deleteFile(from)) {
>                     LOG.warn("Renaming file from: {} to: {} failed due cannot delete
from file: {} after copy succeeded", new Object[]{from, to, from});
>                     renamed = false;
>                 }
>                 renamed = true;
> Shouldn't this be :
>                 if (!deleteFile(from)) {
>                     LOG.warn("Renaming file from: {} to: {} failed due cannot delete
from file: {} after copy succeeded", new Object[]{from, to, from});
>                     renamed = false;
>                 }
>                 else renamed = true;
>            

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Mime
View raw message