diff options
author | tomlu <tomlu@google.com> | 2018-01-19 09:28:06 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-01-19 09:30:16 -0800 |
commit | 8cc5dcf34cf5156db78ccf5f936ca3c8b893c36f (patch) | |
tree | 5d10eb07b1c4bcd43c36ac4dc02c31a18a2fe3d0 /src/main/java/com/google/devtools/build/lib/skyframe/FileFunction.java | |
parent | 8608df20d98873d1aecf2d6f08836d0b56f826fa (diff) |
Rename relativePath -> rootRelativePath in Root and friends.
This makes it clearer that the path fragments in question are relative *to the root*. Confusingly, when the root is absolute, the root relative fragment is also absolute. This makes it a tiny bit clearer that the path fragment may be absolute.
PiperOrigin-RevId: 182544893
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe/FileFunction.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/FileFunction.java | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/skyframe/FileFunction.java b/src/main/java/com/google/devtools/build/lib/skyframe/FileFunction.java index 9cae797a5f..dc04d4b306 100644 --- a/src/main/java/com/google/devtools/build/lib/skyframe/FileFunction.java +++ b/src/main/java/com/google/devtools/build/lib/skyframe/FileFunction.java @@ -55,7 +55,7 @@ public class FileFunction implements SkyFunction { RootedPath rootedPath = (RootedPath) skyKey.argument(); RootedPath realRootedPath = null; FileStateValue realFileStateValue = null; - PathFragment relativePath = rootedPath.getRelativePath(); + PathFragment relativePath = rootedPath.getRootRelativePath(); // Resolve ancestor symlinks, but only if the current file is not the filesystem root (has no // parent) or a package path root (treated opaquely and handled by skyframe's DiffAwareness @@ -117,7 +117,7 @@ public class FileFunction implements SkyFunction { private static Pair<RootedPath, FileStateValue> resolveFromAncestors( RootedPath rootedPath, Environment env) throws FileFunctionException, InterruptedException { - PathFragment relativePath = rootedPath.getRelativePath(); + PathFragment relativePath = rootedPath.getRootRelativePath(); RootedPath realRootedPath = rootedPath; FileValue parentFileValue = null; PathFragment parentDirectory = relativePath.getParentDirectory(); @@ -130,8 +130,10 @@ public class FileFunction implements SkyFunction { } PathFragment baseName = PathFragment.create(relativePath.getBaseName()); RootedPath parentRealRootedPath = parentFileValue.realRootedPath(); - realRootedPath = RootedPath.toRootedPath(parentRealRootedPath.getRoot(), - parentRealRootedPath.getRelativePath().getRelative(baseName)); + realRootedPath = + RootedPath.toRootedPath( + parentRealRootedPath.getRoot(), + parentRealRootedPath.getRootRelativePath().getRelative(baseName)); if (!parentFileValue.exists()) { return Pair.<RootedPath, FileStateValue>of( |