When in use, always return ActionFS paths from the ActionExecutionContext. Instead,defer to ActionFS regarding the choice about delegation to top-level Filesystem.
RELNOTES: None
@@ -146,11 +146,16 @@ public class ActionExecutionContext implements Closeable {
}
public FileSystem getFileSystem() {
+ if (actionFileSystem != null) {
+ return actionFileSystem;
+ }
return executor.getFileSystem();
}
public Path getExecRoot() {
- return executor.getExecRoot();
+ return actionFileSystem != null
+ ? actionFileSystem.getPath(executor.getExecRoot().asFragment())
+ : executor.getExecRoot();
}
/**
@@ -170,7 +175,7 @@ public class ActionExecutionContext implements Closeable {
}
return artifact.getPath();
}
- return executor.getExecRoot().getRelative(input.getExecPath());
+ return getExecRoot().getRelative(input.getExecPath());
}
public Root getRoot(Artifact artifact) {
