diff options
author | 2016-05-03 17:46:59 +0000 | |
---|---|---|
committer | 2016-05-03 21:33:26 +0000 | |
commit | 095fb1b05fc5934b426ebae47076a25ceaefe394 (patch) | |
tree | 1a9cbac0e4783eb6358478a8606c302b68c4c76a /src/main/java/com/google/devtools/build/lib/vfs/FileSystemUtils.java | |
parent | f296e87893a422cc5786982205027cc6ffe222c1 (diff) |
When creating the exec root symlink forest, take account of the empty package's package root when creating top-level directories. Otherwise, if the empty package references files in those top-level directories, they would be hidden.
Fixes #1221
--
MOS_MIGRATED_REVID=121392128
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/vfs/FileSystemUtils.java')
-rw-r--r-- | src/main/java/com/google/devtools/build/lib/vfs/FileSystemUtils.java | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/vfs/FileSystemUtils.java b/src/main/java/com/google/devtools/build/lib/vfs/FileSystemUtils.java index d8a198bce4..9ef39736b6 100644 --- a/src/main/java/com/google/devtools/build/lib/vfs/FileSystemUtils.java +++ b/src/main/java/com/google/devtools/build/lib/vfs/FileSystemUtils.java @@ -142,8 +142,8 @@ public class FileSystemUtils { * contained in 'path'. I.e the closest ancestor directory containing path. * Returns null if none found. */ - public static PathFragment longestPathPrefix(PathFragment path, Set<PathFragment> prefixes) { - for (int i = path.segmentCount(); i >= 1; i--) { + static PathFragment longestPathPrefix(PathFragment path, Set<PathFragment> prefixes) { + for (int i = path.segmentCount(); i >= 0; i--) { PathFragment prefix = path.subFragment(0, i); if (prefixes.contains(prefix)) { return prefix; |