LocalVersion is unavailable until after AddRepo (fixes #154)

This commit is contained in:
Jakob Borg
2014-09-22 14:03:58 +02:00
parent 39cf269d6b
commit 434ecdac6b
2 changed files with 2 additions and 4 deletions

View File

@@ -1044,7 +1044,7 @@ func (m *Model) LocalVersion(repo string) uint64 {
fs, ok := m.repoFiles[repo]
if !ok {
return 0
panic("bug: LocalVersion called for nonexistent repo " + repo)
}
ver := fs.LocalVersion(protocol.LocalNodeID)