diff options
Diffstat (limited to 'lib/db/set.go')
-rw-r--r-- | lib/db/set.go | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/lib/db/set.go b/lib/db/set.go index 84cfb3452d..fb4a9fda5c 100644 --- a/lib/db/set.go +++ b/lib/db/set.go @@ -168,6 +168,10 @@ type Snapshot struct { func (s *FileSet) Snapshot() (*Snapshot, error) { opStr := fmt.Sprintf("%s Snapshot()", s.folder) l.Debugf(opStr) + + s.updateMutex.Lock() + defer s.updateMutex.Unlock() + t, err := s.db.newReadOnlyTransaction() if err != nil { s.db.handleFailure(err) |