diff options
author | 2018-01-18 10:29:11 -0800 | |
---|---|---|
committer | 2018-01-18 10:31:11 -0800 | |
commit | 4c9fafd8e7137ed117529e0a72ed4d9aefe6ec48 (patch) | |
tree | 323f9f1ba9aba622847f2da082f273b9c8e09ebf /src/main/java/com/google/devtools/build/lib/skyframe | |
parent | 4dce09cdc7914d76401a6f77fd78e0176d173dd1 (diff) |
Add absolute root concept.
An absolute root accepts any absolute path fragments and simply returns it.
This concept replaces the FileSystem root directory concept.
PiperOrigin-RevId: 182400471
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/skyframe')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/skyframe/FileFunction.java | 6 |
1 files changed, 3 insertions, 3 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 74980d251f..9cae797a5f 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 @@ -120,9 +120,9 @@ public class FileFunction implements SkyFunction { PathFragment relativePath = rootedPath.getRelativePath(); RootedPath realRootedPath = rootedPath; FileValue parentFileValue = null; - if (!relativePath.equals(PathFragment.EMPTY_FRAGMENT)) { - RootedPath parentRootedPath = RootedPath.toRootedPath(rootedPath.getRoot(), - relativePath.getParentDirectory()); + PathFragment parentDirectory = relativePath.getParentDirectory(); + if (parentDirectory != null) { + RootedPath parentRootedPath = RootedPath.toRootedPath(rootedPath.getRoot(), parentDirectory); parentFileValue = (FileValue) env.getValue(FileValue.key(parentRootedPath)); if (parentFileValue == null) { |