Bläddra i källkod

lib/db: Don't panic on incorrect BlocksHash (fixes #6353) (#6355)

Simon Frei 5 år sedan
förälder
incheckning
32e12abb43
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      lib/db/transactions.go

+ 2 - 2
lib/db/transactions.go

@@ -469,8 +469,8 @@ func (t readWriteTransaction) putFile(key []byte, fi protocol.FileInfo) error {
 			return err
 		}
 	} else if fi.BlocksHash != nil {
-		l.Warnln("Blocks is nil, but BlocksHash is not for file", fi)
-		panic("Blocks is nil, but BlocksHash is not")
+		l.Debugln("Blocks is nil, but BlocksHash is not for file", fi)
+		fi.BlocksHash = nil
 	}
 
 	fi.Blocks = nil