From 05e23f199144c6c64dcf0df811bea55b9c839d1f Mon Sep 17 00:00:00 2001 From: Simon Frei Date: Fri, 14 Feb 2020 08:11:24 +0100 Subject: [PATCH] lib/db: Don't call backend.Commit twice (ref #6337) (#6342) --- lib/db/transactions.go | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/lib/db/transactions.go b/lib/db/transactions.go index 496e89835..e18f872a7 100644 --- a/lib/db/transactions.go +++ b/lib/db/transactions.go @@ -755,10 +755,7 @@ func (t *readWriteTransaction) withAllFolderTruncated(folder []byte, fn func(dev return nil } } - if err := dbi.Error(); err != nil { - return err - } - return t.Commit() + return dbi.Error() } type marshaller interface {