lib/model: Use correct lock (#5683)

This commit is contained in:
Simon Frei 2019-05-02 14:09:42 +02:00 committed by GitHub
parent 9f358ecae0
commit defc5dca65
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 3 deletions

View File

@ -2384,9 +2384,8 @@ next:
// BringToFront bumps the given files priority in the job queue.
func (m *model) BringToFront(folder, file string) {
m.pmut.RLock()
defer m.pmut.RUnlock()
m.fmut.RLock()
defer m.fmut.RUnlock()
runner, ok := m.folderRunners[folder]
if ok {
runner.BringToFront(file)