diff options
author | tomlu <tomlu@google.com> | 2018-01-19 10:25:19 -0800 |
---|---|---|
committer | Copybara-Service <copybara-piper@google.com> | 2018-01-19 10:27:24 -0800 |
commit | e7552c53a5dd65ae496562fc29adecd89e9db5fb (patch) | |
tree | f33fb86896b10777b5652812d161454a2cefbe6c /src/main/java/com/google/devtools/build/lib/rules/repository | |
parent | 26866939e115798cf91d7a02de5417ad81314384 (diff) |
Fix usages of PathFragment segments that will become inefficient.
An upcoming replacement to PathFragment will not have efficient segment semantics, causing code to become unnecessarily inefficient.
RELNOTES: None
PiperOrigin-RevId: 182553098
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/repository')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryFunction.java | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryFunction.java b/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryFunction.java index 024287deb3..2b15ced504 100644 --- a/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryFunction.java +++ b/src/main/java/com/google/devtools/build/lib/rules/repository/RepositoryFunction.java @@ -509,7 +509,7 @@ public abstract class RepositoryFunction { throws IOException, InterruptedException { Path externalRepoDir = getExternalRepositoryDirectory(directories); PathFragment repositoryPath = rootedPath.asPath().relativeTo(externalRepoDir); - if (repositoryPath.segmentCount() == 0) { + if (repositoryPath.isEmpty()) { // We are the top of the repository path (<outputBase>/external), not in an actual external // repository path. return; |