AHeise commented on a change in pull request #10567: [FLINK-15244][FileSystems]
Fix the bug that FileUtils#deleteDirectoryInternal will delete files in the
symbolic link which point to a directory.
URL: https://github.com/apache/flink/pull/10567#discussion_r358681435
##########
File path: flink-core/src/main/java/org/apache/flink/util/FileUtils.java
##########
@@ -315,7 +315,11 @@ private static void deleteFileOrDirectoryInternal(File
file) throws IOException
}
private static void deleteDirectoryInternal(File directory) throws
IOException {
Review comment:
What is happening when `directory` contains a link to another directory?
- directory
- 1
- symlink -> /etc/
I think that the actual issue is not `deleteDirectoryInternal`
(`Files.deleteIfExists` would only delete symbolic link), but rather
`cleanDirectoryInternal` not handling symbolic links correctly.
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services