fix autoindex at /
This commit is contained in:
parent
971f7e75e1
commit
75a88a4c41
|
@ -138,6 +138,7 @@ public class BrowserContext {
|
|||
InputStream stream = requestCatcher.getClass().getClassLoader().getResourceAsStream(file);
|
||||
if(stream == null) {
|
||||
if(new File(file).isDirectory() && path != null) {
|
||||
while(path.endsWith("/")) path = path.substring(0, path.length() - 1);
|
||||
File[] files = new File(file).listFiles();
|
||||
builder.append("<ul>");
|
||||
for(int i = 0; i < files.length; i++) {
|
||||
|
@ -171,6 +172,7 @@ public class BrowserContext {
|
|||
InputStream stream = requestCatcher.getClass().getClassLoader().getResourceAsStream(file);
|
||||
if(stream == null) {
|
||||
if(new File(file).isDirectory() && path != null) {
|
||||
while(path.endsWith("/")) path = path.substring(0, path.length() - 1);
|
||||
File[] files = new File(file).listFiles();
|
||||
StringBuilder builder = new StringBuilder();
|
||||
builder.append("<ul>");
|
||||
|
|
Loading…
Reference in a new issue