lib/db: Dont add symlinks to blocks map (fixes #6637) (#6639)

This commit is contained in:
Simon Frei
2020-05-13 20:47:05 +02:00
committed by Jakob Borg
parent 6201eebc98
commit 6768daec07
3 changed files with 7 additions and 3 deletions
+2 -2
View File
@@ -198,7 +198,7 @@ func (db *Lowlevel) updateLocalFiles(folder []byte, fs []protocol.FileInfo, meta
blocksHashSame := ok && bytes.Equal(ef.BlocksHash, f.BlocksHash)
if ok {
if !ef.IsDirectory() && !ef.IsDeleted() && !ef.IsInvalid() {
if len(ef.Blocks) != 0 && !ef.IsInvalid() {
for _, block := range ef.Blocks {
keyBuf, err = db.keyer.GenerateBlockMapKey(keyBuf, folder, block.Hash, name)
if err != nil {
@@ -259,7 +259,7 @@ func (db *Lowlevel) updateLocalFiles(folder []byte, fs []protocol.FileInfo, meta
}
l.Debugf("adding sequence; folder=%q sequence=%v %v", folder, f.Sequence, f.Name)
if !f.IsDirectory() && !f.IsDeleted() && !f.IsInvalid() {
if len(f.Blocks) != 0 && !f.IsInvalid() {
for i, block := range f.Blocks {
binary.BigEndian.PutUint32(blockBuf, uint32(i))
keyBuf, err = db.keyer.GenerateBlockMapKey(keyBuf, folder, block.Hash, name)