Merge branch 'master' into context

This commit is contained in:
Danila Fedorin 2017-09-11 19:32:42 -07:00
commit 00f8475044
1 changed files with 3 additions and 1 deletions

View File

@ -45,7 +45,9 @@ class ExtendedConfiguration(var computationDelay: Double = 0.0,
* @param tomlFile the file from disk to load.
*/
constructor(tomlFile: File) : this() {
copyFrom(Toml(DEFAULT_TOML_READER).read(tomlFile).to(ExtendedConfiguration::class.java))
val toml = Toml(DEFAULT_TOML_READER)
if(tomlFile.exists()) toml.read(tomlFile)
copyFrom(toml.to(ExtendedConfiguration::class.java))
}
/**