diff --git a/core/src/main/groovy/com/muwire/core/search/BrowseManager.groovy b/core/src/main/groovy/com/muwire/core/search/BrowseManager.groovy index 8dcbac8d..be6b40f3 100644 --- a/core/src/main/groovy/com/muwire/core/search/BrowseManager.groovy +++ b/core/src/main/groovy/com/muwire/core/search/BrowseManager.groovy @@ -100,7 +100,7 @@ class BrowseManager { String first = path.getName(0) String[] more = new String[path.getNameCount()] for (int i = 1; i < path.getNameCount(); i ++) - more[i - 1] = path.getName(i) + more[i - 1] = path.getName(i).toString() more[more.length - 1] = sf.getFile().getName() path = Path.of(first, more) } diff --git a/core/src/main/groovy/com/muwire/core/search/BrowseSession.groovy b/core/src/main/groovy/com/muwire/core/search/BrowseSession.groovy index 85f7e1b9..7cbcf76e 100644 --- a/core/src/main/groovy/com/muwire/core/search/BrowseSession.groovy +++ b/core/src/main/groovy/com/muwire/core/search/BrowseSession.groovy @@ -122,7 +122,7 @@ class BrowseSession implements Runnable { JsonSlurper slurper = new JsonSlurper() DataInputStream dis = new DataInputStream(new GZIPInputStream(is)) - UIResultEvent[] batch = new UIResultEvent[Math.min(BATCH_SIZE, results)] + UIResultEvent[] batch = new UIResultEvent[Math.min(BATCH_SIZE, files)] int j = 0 for (int i = 0; i < files; i ++) { if (closed)