Skip to content

Commit 9ed9e3f

Browse files
committed
Fix the path in mocked fs FileStatus for *nix systems.
Signed-off-by: Wei Zhang <[email protected]>
1 parent 42b7f60 commit 9ed9e3f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Utils/hdinsight-node-common/src/com/microsoft/azure/hdinsight/spark/mock/MockRawLocalFileSystem.java

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,10 @@ public Path getLinkTarget(Path f) throws IOException {
9191
private FileStatus getNativeFileLinkStatus(final Path f,
9292
boolean dereference) throws IOException {
9393
Stat stat = new Stat(f, getDefaultBlockSize(f), dereference, this);
94-
return stat.getFileStatus();
94+
FileStatus status = stat.getFileStatus();
95+
status.setPath(f);
96+
97+
return status;
9598
}
9699

97100
private FileStatus getFileLinkStatusInternal(final Path f,

0 commit comments

Comments
 (0)