Details
-
Bug
-
Status: Closed
-
Critical
-
Resolution: Fixed
-
1.3.2
-
None
-
None
-
Debian Linux JDK 1.5
Description
If there is an orphaned softlink a -> b, but b does not exists anymore than the softlink will not be removed. This happens when you call FileUtils.deleteDirectory() and when the linked target b is deleted earlier than the link.
This is caused by the "ugly" file.exists() call in forceDelete()
if (!file.exists()) {
throw new FileNotFoundException("File does not exist: " + file);
}
if this check is not done, everything works as expected. I think this test is not neccessery, cause file.delete will test this better.
Please discuss and change this.
thanx
Stefan