Don't creash when replacing with empty file set

This commit is contained in:
Jakob Borg 2014-07-15 00:06:54 +02:00
parent 44bc5fd784
commit bd2b5db8f3

View File

@ -150,7 +150,7 @@ func ldbGenericReplace(db *leveldb.DB, repo, node []byte, fs []protocol.FileInfo
ldbUpdateGlobal(snap, batch, repo, node, newName, fs[fsi].Version)
fsi++
case cmp == 0:
case moreFs && moreDb && cmp == 0:
// File exists on both sides - compare versions.
var ef protocol.FileInfo
ef.UnmarshalXDR(dbi.Value())