mirror of
https://github.com/Qortal/qortal.git
synced 2025-07-20 03:11:21 +00:00
added support for single file websites
This commit is contained in:
parent
5b402e0bca
commit
a3bb6638bf
@ -62,7 +62,17 @@ public enum Service {
|
||||
|
||||
// Custom validation function to require an index HTML file in the root directory
|
||||
List<String> fileNames = ArbitraryDataRenderer.indexFiles();
|
||||
String[] files = path.toFile().list();
|
||||
List<String> files;
|
||||
|
||||
// single files are paackaged differently
|
||||
if( path.toFile().isFile() ) {
|
||||
files = new ArrayList<>(1);
|
||||
files.add(path.getFileName().toString());
|
||||
}
|
||||
else {
|
||||
files = new ArrayList<>(Arrays.asList(path.toFile().list()));
|
||||
}
|
||||
|
||||
if (files != null) {
|
||||
for (String file : files) {
|
||||
Path fileName = Paths.get(file).getFileName();
|
||||
|
Loading…
x
Reference in New Issue
Block a user