Fix website sub-folder rendering 404

This commit is contained in:
Jürg Schulthess 2023-07-03 09:52:07 +02:00
parent fd8d720946
commit cc8cdcd93a

View File

@ -127,6 +127,11 @@ public class ArbitraryDataRenderer {
String filename = this.getFilename(unzippedPath, inPath);
Path filePath = Paths.get(unzippedPath, filename);
boolean usingCustomRouting = false;
if (Files.isDirectory(filePath) && (!inPath.endsWith("/"))) {
inPath = inPath + "/";
filename = this.getFilename(unzippedPath, inPath);
filePath = Paths.get(unzippedPath, filename);
}
// If the file doesn't exist, we may need to route the request elsewhere, or cleanup
if (!Files.exists(filePath)) {