improved archive: storage dir cannow be configured. also, mails are now displayed in send-time order

This commit is contained in:
2022-04-20 18:12:56 +02:00
parent 915712e636
commit d36300e0bb
8 changed files with 37 additions and 14 deletions

View File

@@ -59,6 +59,7 @@ public class Configuration {
dbFile();
baseUrl();
serverPort();
archiveDir();
return this;
}
@@ -92,6 +93,13 @@ public class Configuration {
return this;
}
public File archiveDir() {
var locations = locations();
if (!locations.containsKey(ARCHIVE)) locations.put(ARCHIVE, String.join(File.separator,baseDir(),"archive"));
return new File((String) locations.get(ARCHIVE));
}
public int serverPort() {
if (!data.containsKey(PORT)) data.put(PORT,80L);
var o = data.get(PORT);
@@ -107,4 +115,5 @@ public class Configuration {
public File file() {
return file;
}
}