mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-09 14:50:56 +00:00
Folders queried by the REST interface might not exist in the model (fixes #823)
This commit is contained in:
parent
484ce8e488
commit
5656be5206
@ -1216,7 +1216,9 @@ func (m *Model) CurrentLocalVersion(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
|
||||
}
|
||||
|
||||
return fs.LocalVersion(protocol.LocalDeviceID)
|
||||
|
Loading…
Reference in New Issue
Block a user