Forráskód Böngészése

lib/db: Empty slice is not nil (fixes #2872)

Audrius Butkevicius 9 éve
szülő
commit
6130578d18
1 módosított fájl, 1 hozzáadás és 1 törlés
  1. 1 1
      lib/db/leveldb_transactions.go

+ 1 - 1
lib/db/leveldb_transactions.go

@@ -100,7 +100,7 @@ func (t readWriteTransaction) updateGlobal(folder, device []byte, file protocol.
 	var oldFile protocol.FileInfo
 	var hasOldFile bool
 	// Remove the device from the current version list
-	if svl != nil {
+	if len(svl) != 0 {
 		err = fl.UnmarshalXDR(svl)
 		if err != nil {
 			panic(err)