Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,8 @@ public class SFTPFileSystem extends FileSystem {
public static final String E_FAILED_GETHOME = "Failed to get home directory";
public static final String E_FAILED_DISCONNECT = "Failed to disconnect";

public Path workDir;

private void setConfigurationFromURI(URI uriInfo, Configuration conf) throws IOException {

// get host information from URI
Expand Down Expand Up @@ -607,7 +609,10 @@ public void setWorkingDirectory(Path newDir) {
@Override
public Path getWorkingDirectory() {
// Return home directory always since we do not maintain state.
return getHomeDirectory();
if (workDir == null) {
workDir = getHomeDirectory();
}
return workDir;
}

@Override
Expand Down