Skip to content

Commit cb11e94

Browse files
committed
Use the root path for OpenContainerPathTree#getRoots()
The container path is the path of the container (could be a directory or an archive and shouldn't be used for browsing. The root path is the path of the root. In the case of an archive, it's actually a ZipPath, which can be used to browse the archive. Fixes #42571 (cherry picked from commit 6dd6150)
1 parent 2ff3b6c commit cb11e94

File tree

2 files changed

+2
-3
lines changed

2 files changed

+2
-3
lines changed

independent-projects/bootstrap/app-model/src/main/java/io/quarkus/paths/OpenContainerPathTree.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public OpenPathTree open() {
9393

9494
@Override
9595
public Collection<Path> getRoots() {
96-
return List.of(getContainerPath());
96+
return List.of(getRootPath());
9797
}
9898

9999
@Override

independent-projects/bootstrap/app-model/src/main/java/io/quarkus/paths/PathTree.java

+1-2
Original file line numberDiff line numberDiff line change
@@ -83,8 +83,7 @@ static PathTree ofArchive(Path archive, PathFilter filter) {
8383
/**
8484
* The roots of the path tree.
8585
* <p>
86-
* Note that for archives, it will return the path to the archive itself,
87-
* not a path that you can browse.
86+
* Note that you shouldn't use these roots for browsing except if the PathTree is open.
8887
*
8988
* @return roots of the path tree
9089
*/

0 commit comments

Comments
 (0)