[ 
https://issues.apache.org/jira/browse/IO-702?focusedWorklogId=536850&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-536850
 ]

ASF GitHub Bot logged work on IO-702:
-------------------------------------

                Author: ASF GitHub Bot
            Created on: 16/Jan/21 19:05
            Start Date: 16/Jan/21 19:05
    Worklog Time Spent: 10m 
      Work Description: boris-unckel commented on pull request #187:
URL: https://github.com/apache/commons-io/pull/187#issuecomment-761616980


   @garydgregory
   Fixed the DeletingPathVisitor.visitFile with an additional check for 
symlinks. Please review again.
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Issue Time Tracking
-------------------

    Worklog Id:     (was: 536850)
    Time Spent: 2h 20m  (was: 2h 10m)

> FileUtils.forceDelete does not delete invalid links
> ---------------------------------------------------
>
>                 Key: IO-702
>                 URL: https://issues.apache.org/jira/browse/IO-702
>             Project: Commons IO
>          Issue Type: Bug
>          Components: Utilities
>    Affects Versions: 2.8.0
>            Reporter: Boris Unckel
>            Priority: Critical
>          Time Spent: 2h 20m
>  Remaining Estimate: 0h
>
> The current implementation of FileUtils.forceDelete does not delete invalid 
> links. Invalid links means one pointing to a non existing directory. This is 
> _not related_ to the intended behaviour to _keep the destination_ of the link.
> The FileUtils.cleanDirectory is based on forceDelete but does not check the 
> result. FileUtils.cleanDirectory assumes "no exception" means "directory is 
> clean".
> FileUtils.deleteDirectory fails with "directory not empty".
> Testcase result (will provide that)
> {code:java}
> java.nio.file.DirectoryNotEmptyException: 
> /tmp/junit4962570063696933090/realParentDirC
>       at 
> java.base/sun.nio.fs.UnixFileSystemProvider.implDelete(UnixFileSystemProvider.java:246)
>       at 
> java.base/sun.nio.fs.AbstractFileSystemProvider.delete(AbstractFileSystemProvider.java:105)
>       at java.base/java.nio.file.Files.delete(Files.java:1146)
>       at org.apache.commons.io.FileUtils.delete(FileUtils.java:1173)
>       at org.apache.commons.io.FileUtils.deleteDirectory(FileUtils.java:1192)
>       at 
> org.apache.commons.io.FileUtilsDeleteDirectoryBaseTestCase.testDeleteInvalidLinks(FileUtilsDeleteDirectoryBaseTestCase.java:216)
> {code}



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

Reply via email to