Don't panic on queries for nonexistent folders (fixes #765)
This commit is contained in:
parent
39a2934b05
commit
d8b335ce65
@ -1261,7 +1261,9 @@ func (m *Model) RemoteLocalVersion(folder string) uint64 {
|
|||||||
|
|
||||||
fs, ok := m.folderFiles[folder]
|
fs, ok := m.folderFiles[folder]
|
||||||
if !ok {
|
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
|
var ver uint64
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user