From 90d9b2de2b54e91011cdbcfe86dd6ad749a2e9c3 Mon Sep 17 00:00:00 2001 From: Evgeny Kuznetsov Date: Tue, 12 Mar 2019 11:20:47 +0300 Subject: [PATCH] cmd/syncthing: Add a check for particular far-future version of config (fixes #1101) --- cmd/syncthing/main.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index a8b9adb4b..010d61c84 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -989,6 +989,9 @@ func loadConfigAtStartup(allowNewerConfig bool) (config.Wrapper, error) { } if cfg.RawCopy().OriginalVersion != config.CurrentVersion { + if cfg.RawCopy().OriginalVersion == config.CurrentVersion+1101 { + l.Infof("Now, THAT's what we call a config from the future! Don't worry. As long as you hit that wire with the connecting hook at precisely eighty-eight miles per hour the instant the lightning strikes the tower... everything will be fine.") + } if cfg.RawCopy().OriginalVersion > config.CurrentVersion && !allowNewerConfig { return nil, fmt.Errorf("Config file version (%d) is newer than supported version (%d). If this is expected, use -allow-newer-config to override.", cfg.RawCopy().OriginalVersion, config.CurrentVersion) }