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_r358672721
 
 

 ##########
 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 {
-               if (directory.isDirectory()) {
+               if (Files.isSymbolicLink(directory.toPath())) {
+                       //noinspection ResultOfMethodCallIgnored
 
 Review comment:
   Please remove `//noinspection ResultOfMethodCallIgnored`. Even though most 
of us have IntelliJ, it's still noise for anyone how does not have an active 
warning here.

----------------------------------------------------------------
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

Reply via email to