tillrohrmann commented on a change in pull request #15999:
URL: https://github.com/apache/flink/pull/15999#discussion_r686768080



##########
File path: 
flink-yarn/src/main/java/org/apache/flink/yarn/YarnApplicationFileUploader.java
##########
@@ -258,7 +258,7 @@ YarnLocalResourceDescriptor registerSingleLocalResource(
                     final java.nio.file.Path shipPath = file.toPath();
                     final java.nio.file.Path parentPath = shipPath.getParent();
                     Files.walkFileTree(
-                            shipPath,
+                            shipPath.toRealPath(),

Review comment:
       This will only solve the problem that `shipPath` is a symbolic link. 
What about if `shipPath` contains a symbolic link somewhere farther down? 
Wouldn't then something like
   
   ```
   Files.walkFileTree(shipPath, EnumSet.of(FileVisitOption.FOLLOW_LINKS), 
Integer.MAX_VALUE, visitor);
   ```
   
   be better suited?




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

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to