LuciferYang commented on code in PR #8932:
URL: https://github.com/apache/hadoop/pull/8932#discussion_r4572866815


##########
hadoop-common-project/hadoop-common/src/main/java/org/apache/hadoop/fs/RawLocalFileSystem.java:
##########
@@ -1330,7 +1330,7 @@ private FileStatus getFileLinkStatusInternal(final Path f,
   @Deprecated
   private FileStatus deprecatedGetFileLinkStatusInternal(final Path f)
       throws IOException {
-    String target = FileUtil.readLink(new File(f.toString()));
+    String target = FileUtil.readLink(pathToFile(f));

Review Comment:
   Done. Both symlink returns in `deprecatedGetFileLinkStatusInternal` now use 
`makeQualified(f)`, which matches the path Stat returns. Added 
`testGetLinkStatusRelPathDeprecated` to `TestSymlinkLocalFSFileSystem`: with 
the working directory set, it calls `getFileLinkStatus` on relative paths to a 
link and to a dangling link, both with relative targets. Without the fix it 
fails with that `IllegalArgumentException`.



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to