lib/config, lib/syncthing: Only drop delta index on upgrade if so ordered (fixes #6982) (#6983)

This commit is contained in:
Jakob Borg
2020-09-30 20:16:30 +02:00
committed by GitHub
parent 3fe331c2d0
commit 7774932302
3 changed files with 204 additions and 194 deletions
+5 -3
View File
@@ -240,9 +240,11 @@ func (a *App) startup() error {
l.Infoln("Detected upgrade from", prevVersion, "to", build.Version)
}
// Drop delta indexes in case we've changed random stuff we
// shouldn't have. We will resend our index on next connect.
db.DropDeltaIndexIDs(a.ll)
if a.cfg.Options().SendFullIndexOnUpgrade {
// Drop delta indexes in case we've changed random stuff we
// shouldn't have. We will resend our index on next connect.
db.DropDeltaIndexIDs(a.ll)
}
}
if build.Version != prevVersion {