You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Gary D. Gregory (Jira)" <ji...@apache.org> on 2022/08/08 14:52:00 UTC

[jira] [Commented] (IO-573) Inconsistency between org.apache.commons.io.FileUtils.(moveFile(File, File) and moveDirectory(File, File)) methods

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

Gary D. Gregory commented on IO-573:
------------------------------------

Hi [~pranet] 

Would you check and see if our current version 2.11.0 addresses your needs? 

> Inconsistency between org.apache.commons.io.FileUtils.(moveFile(File, File) and moveDirectory(File, File)) methods
> ------------------------------------------------------------------------------------------------------------------
>
>                 Key: IO-573
>                 URL: https://issues.apache.org/jira/browse/IO-573
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.6
>            Reporter: Pranet Verma
>            Priority: Major
>
> When the destination directory is on a different filesystem, the documentation says we need to copy and delete. In case the delete fails, org.apache.commons.io.FileUtils.moveFile(File, File) will attempt to delete the destination file too before throwing an error, but
> org.apache.commons.io.FileUtils.moveDirectory(File, File) will directly throw an error without deleting the newly copied (created) destination directory. Is this intentional?



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