aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/main/java/com/google/devtools/build/lib/vfs/UnionFileSystem.java
diff options
context:
space:
mode:
authorGravatar tomlu <tomlu@google.com>2017-10-23 18:16:44 +0200
committerGravatar Dmitry Lomov <dslomov@google.com>2017-10-23 18:42:42 +0200
commit0a82e703427bad76884396c171a4517e88474d69 (patch)
tree5a5a4c87dcbf6426dd0ee620f07405500b4e831d /src/main/java/com/google/devtools/build/lib/vfs/UnionFileSystem.java
parentb80c21a3eee246a1e9c7b9b2b1e19f769f93430a (diff)
Change FileSystem#getDirectoryEntries to return strings of the file/directory names instead of paths.
This is a small isolated change that can be done ahead of the big refactoring. PiperOrigin-RevId: 173124518
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/vfs/UnionFileSystem.java')
-rw-r--r--src/main/java/com/google/devtools/build/lib/vfs/UnionFileSystem.java7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/main/java/com/google/devtools/build/lib/vfs/UnionFileSystem.java b/src/main/java/com/google/devtools/build/lib/vfs/UnionFileSystem.java
index 8ef2760bb5..e444a591ee 100644
--- a/src/main/java/com/google/devtools/build/lib/vfs/UnionFileSystem.java
+++ b/src/main/java/com/google/devtools/build/lib/vfs/UnionFileSystem.java
@@ -333,15 +333,14 @@ public class UnionFileSystem extends FileSystem {
* @param path the {@link Path} whose children are to be retrieved
*/
@Override
- protected Collection<Path> getDirectoryEntries(Path path) throws IOException {
- Path origPath = path;
+ protected Collection<String> getDirectoryEntries(Path path) throws IOException {
path = internalResolveSymlink(path);
FileSystem delegate = getDelegate(path);
Path resolvedPath = adjustPath(path, delegate);
Collection<Path> entries = resolvedPath.getDirectoryEntries();
- Collection<Path> result = Lists.newArrayListWithCapacity(entries.size());
+ Collection<String> result = Lists.newArrayListWithCapacity(entries.size());
for (Path entry : entries) {
- result.add(origPath.getChild(entry.getBaseName()));
+ result.add(entry.getBaseName());
}
return result;
}