commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shaun Geisert (JIRA)" <j...@apache.org>
Subject [jira] Commented: (IO-141) Infinite loop on FileUtils.copyDirectory when the destination directory is within the source directory
Date Wed, 21 Apr 2010 19:21:50 GMT

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

Shaun Geisert commented on IO-141:
----------------------------------

For anyone who may have fallen victim to the above bug, and is using Windows, and now wants
to be able to delete all those nested folders, you may want to take a look at 

http://www.jowie.com/blog/post/2008/10/27/HOW-TO-Remove-files-that-have-a-path-that-is-too-long-for-Windows-to-delete.aspx

in order to delete the folders using robocopy.

> Infinite loop on FileUtils.copyDirectory when the destination directory is within the
source directory
> ------------------------------------------------------------------------------------------------------
>
>                 Key: IO-141
>                 URL: https://issues.apache.org/jira/browse/IO-141
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 1.3.2
>         Environment: Win XP
>            Reporter: Mark Bryan Yu
>            Assignee: Niall Pemberton
>            Priority: Critical
>             Fix For: 1.4
>
>         Attachments: fix_recursion_bug.patch
>
>
> When you attempt to copy a directory and the destination directory is inside the source
directory an inifinite loop occurs in the copyDirectory causing Commons-IO to create a folder
w/o stopping until its reaches OS limitation.
> This code will recreate the bug:
> FileUtils.copyDirectory(new File("C:\\temp\\test-io\\a\\."), new File("C:\\temp\\test-io\\a\\."
+ File.separator + new Date().getTime()));
> Make sure C:\temp\test-io\a exists

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message