all: Add configurable defaults (fixes #4224, fixes #6086) (#7131)

This commit is contained in:
Simon Frei
2021-02-04 21:10:41 +01:00
committed by GitHub
parent 31119ed61a
commit ffc14a77c6
41 changed files with 1708 additions and 1046 deletions
+6
View File
@@ -27,6 +27,7 @@ import (
// put the newest on top for readability.
var (
migrations = migrationSet{
{34, migrateToConfigV34},
{33, migrateToConfigV33},
{32, migrateToConfigV32},
{31, migrateToConfigV31},
@@ -92,6 +93,11 @@ func (m migration) apply(cfg *Configuration) {
cfg.Version = m.targetVersion
}
func migrateToConfigV34(cfg *Configuration) {
cfg.Defaults.Folder.Path = cfg.Options.DeprecatedDefaultFolderPath
cfg.Options.DeprecatedDefaultFolderPath = ""
}
func migrateToConfigV33(cfg *Configuration) {
for i := range cfg.Devices {
cfg.Devices[i].DeprecatedPendingFolders = nil