summaryrefslogtreecommitdiffstats
path: root/configserver
diff options
context:
space:
mode:
authorJon Marius Venstad <jonmv@gmail.com>2022-04-08 11:44:56 +0200
committerJon Marius Venstad <jonmv@gmail.com>2022-04-08 11:44:56 +0200
commit55d1186ed64c35b27f7a6acae2821b81c648c377 (patch)
tree661ee03bc2fdb36a073a81ff1f45dcf39885694e /configserver
parent5e317721430b7c6d849d93cfef5323795fa7a524 (diff)
Constant time append to Path as well, and add length()
Diffstat (limited to 'configserver')
-rw-r--r--configserver/src/main/java/com/yahoo/vespa/config/server/http/ContentHandler.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/configserver/src/main/java/com/yahoo/vespa/config/server/http/ContentHandler.java b/configserver/src/main/java/com/yahoo/vespa/config/server/http/ContentHandler.java
index 2989eee0b55..7aa9e0aa92c 100644
--- a/configserver/src/main/java/com/yahoo/vespa/config/server/http/ContentHandler.java
+++ b/configserver/src/main/java/com/yahoo/vespa/config/server/http/ContentHandler.java
@@ -63,7 +63,7 @@ public class ContentHandler {
}
private static List<ApplicationFile> listSortedFiles(ApplicationFile file, Path path, boolean recursive) {
- if ( ! path.segments().isEmpty() && ! path.hasTrailingSlash()) {
+ if (path.length() > 0 && ! path.hasTrailingSlash()) {
return List.of(file);
}
List<ApplicationFile> files = file.listFiles(recursive);