From a8799efa949f9cc5fa889617507bfe45977a98d3 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Tue, 5 Aug 2014 12:20:50 +0200 Subject: [PATCH] Don't reuse existing indexes, yet (fixes #463) --- cmd/syncthing/main.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/cmd/syncthing/main.go b/cmd/syncthing/main.go index ad241bab..872e6304 100644 --- a/cmd/syncthing/main.go +++ b/cmd/syncthing/main.go @@ -426,6 +426,15 @@ nextRepo: } } + // Clear out old indexes for other nodes. Otherwise we'll start up and + // start needing a bunch of files which are nowhere to be found. This + // needs to be changed when we correctly do persistent indexes. + for _, repoCfg := range cfg.Repositories { + for _, node := range repoCfg.NodeIDs() { + m.Index(node, repoCfg.ID, nil) + } + } + // Walk the repository and update the local model before establishing any // connections to other nodes.