select where files should be downloaded

This commit is contained in:
Zlatin Balevsky
2019-05-31 11:53:23 +01:00
parent 71473cf541
commit 0df3e63288
3 changed files with 23 additions and 3 deletions

View File

@@ -7,6 +7,7 @@ class MuWireSettings {
final boolean isLeaf
boolean allowUntrusted
String nickname
File downloadLocation
CrawlerResponse crawlerResponse
MuWireSettings() {
@@ -18,6 +19,8 @@ class MuWireSettings {
allowUntrusted = Boolean.valueOf(props.get("allowUntrusted","true"))
crawlerResponse = CrawlerResponse.valueOf(props.get("crawlerResponse","REGISTERED"))
nickname = props.getProperty("nickname","MuWireUser")
downloadLocation = new File((String)props.getProperty("downloadLocation",
System.getProperty("user.home")))
}
void write(OutputStream out) throws IOException {
@@ -26,6 +29,7 @@ class MuWireSettings {
props.setProperty("allowUntrusted", allowUntrusted.toString())
props.setProperty("crawlerResponse", crawlerResponse.toString())
props.setProperty("nickname", nickname)
props.setProperty("downloadLocation", downloadLocation.getAbsolutePath())
props.store(out, "")
}