Menu

#109 Gracefully handle partial prefs file at startup

wont-fix
nobody
None
5
2018-01-11
2017-03-22
No

Currently, if no prefs file is found, all defaults are used. In the case of a partial prefs file, no defaults are used and those missing prefs are left blank. This should be changed so that any missing values are defaulted.

Usecase: I want to automate setup using a script, and I only need to change a few prefs from default. I could create a partial prefs file with only those non-default settings, run davmail, and all other non-specified prefs would fall back to defaults.

This could be accomplished by loading all defaults first, then reading the prefs file and replacing any prefs with values found. I don't see any downside to this approach, since the way it works now (blank values) is never useful.

Discussion

  • Mickael Guessant

    Some settings have a default value, however others don't.

    In your case another approach would be to use the example davmail.properties and script individual property change, e.g. with ant:

    <replaceregexp file="path/to/davmail.properties"
                   match="^davmail.keepDelay=.*"
                   replace="davmail.keepDelay=60"
                   byline="true"/>
    
     
  • Mickael Guessant

    • status: open --> wont-fix
     

Log in to post a comment.