lib/model: Remove incorrect/useless panics (#5881)

This commit is contained in:
Simon Frei
2019-07-23 10:51:16 +02:00
committed by GitHub
parent 7b3d9a8dca
commit 6f08162376
2 changed files with 3 additions and 5 deletions

View File

@@ -248,10 +248,8 @@ func (m *model) StartFolder(folder string) {
// Need to hold lock on m.fmut when calling this.
func (m *model) startFolderLocked(cfg config.FolderConfiguration) {
if err := m.checkFolderRunningLocked(cfg.ID); err == errFolderMissing {
l.Warnln("Cannot start nonexistent folder", cfg.Description())
panic("cannot start nonexistent folder")
} else if err == nil {
_, ok := m.folderRunners[cfg.ID]
if ok {
l.Warnln("Cannot start already running folder", cfg.Description())
panic("cannot start already running folder")
}