Mistake caught by DirectoryBrowserSupportTest.zipDownload.
@@ -366,7 +366,7 @@ public final class DirectoryBrowserSupport implements HttpResponse {
private static void zip(OutputStream outputStream, VirtualFile dir, String glob) throws IOException {
try (ZipOutputStream zos = new ZipOutputStream(outputStream)) {
zos.setEncoding(System.getProperty("file.encoding")); // TODO JENKINS-20663 make this overridable via query parameter
- for (String n : dir.list(glob, null, /* TODO what is the user expectation? */true)) {
+ for (String n : dir.list(glob.isEmpty() ? "**" : glob, null, /* TODO what is the user expectation? */true)) {
String relativePath;
if (glob.length() == 0) {
// JENKINS-19947: traditional behavior is to prepend the directory name
