HDFS-15396. Fix TestViewFileSystemOverloadSchemeHdfsFileSystemContract#testListStatusRootDir. Contributed by Ayush Saxena.
(cherry picked from commit a8610c15c4
)
This commit is contained in:
parent
0e9b6b0124
commit
b720d7770d
|
@ -1163,6 +1163,9 @@ public class ViewFileSystem extends FileSystem {
|
||||||
INodeLink<FileSystem> link = (INodeLink<FileSystem>) inode;
|
INodeLink<FileSystem> link = (INodeLink<FileSystem>) inode;
|
||||||
try {
|
try {
|
||||||
String linkedPath = link.getTargetFileSystem().getUri().getPath();
|
String linkedPath = link.getTargetFileSystem().getUri().getPath();
|
||||||
|
if("".equals(linkedPath)) {
|
||||||
|
linkedPath = "/";
|
||||||
|
}
|
||||||
FileStatus status =
|
FileStatus status =
|
||||||
((ChRootedFileSystem)link.getTargetFileSystem())
|
((ChRootedFileSystem)link.getTargetFileSystem())
|
||||||
.getMyFs().getFileStatus(new Path(linkedPath));
|
.getMyFs().getFileStatus(new Path(linkedPath));
|
||||||
|
|
Loading…
Reference in New Issue