From d8b335ce65a62eef00615e52b5d2e905f747b800 Mon Sep 17 00:00:00 2001 From: Jakob Borg Date: Fri, 24 Oct 2014 14:54:36 +0200 Subject: [PATCH] Don't panic on queries for nonexistent folders (fixes #765) --- internal/model/model.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/model/model.go b/internal/model/model.go index 3618aed40..60e3614fa 100644 --- a/internal/model/model.go +++ b/internal/model/model.go @@ -1261,7 +1261,9 @@ func (m *Model) RemoteLocalVersion(folder string) uint64 { fs, ok := m.folderFiles[folder] if !ok { - panic("bug: LocalVersion called for nonexistent folder " + folder) + // The folder might not exist, since this can be called with a user + // specified folder name from the REST interface. + return 0 } var ver uint64