When deleting symlinks, File/PathUtils.deleteDirectory()
changes file permissions of the target.
Better assertion message. Builds OK on Windows and macOS, one test fails
on Ubuntu.
MODIFY
src/test/java/org/apache/commons/io/DeleteDirectoryTest.java
src/test/java/org/apache/commons/io/DeleteDirectoryTest.java
@@ -100,8 +100,8 @@ public void testDeleteFileCheckParentAccess() throws IOException {
// A file is RO in POSIX if the parent is not W & E.
PathUtils.setReadOnly(file, true);
final Set<PosixFilePermission> permissions = Files.getPosixFilePermissions(testDir);
- assertFalse(Files.isWritable(testDir));
- assertFalse(Files.isExecutable(testDir));
+ assertFalse(Files.isWritable(testDir), () -> String.format("Directory '%s' should be Writable, permissions are %s ", testDir, permissions));
+ assertFalse(Files.isExecutable(testDir), () -> String.format("Directory '%s' should be Executable, permissions are %s ", testDir, permissions));
assertThrows(IOException.class, () -> PathUtils.delete(file));
// Nothing happened, we're not even allowed to test attributes, so the file seems deleted, but it is not.

[IO-751] When deleting symlinks, File/PathUtils.deleteDirectory()
changes file permissions of the target.


Better assertion message. Builds OK on Windows and macOS, one test fails
on Ubuntu.