From a5e40563deeb10c0745a7eb0f132bbd2c7e1618d Mon Sep 17 00:00:00 2001 From: Audrius Butkevicius Date: Sun, 25 Mar 2018 21:12:50 +0100 Subject: [PATCH] lib/model: Don't log ignored files (fixes #4832) (#4837) --- lib/model/model.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/model/model.go b/lib/model/model.go index 6f5f150e..19d707f5 100644 --- a/lib/model/model.go +++ b/lib/model/model.go @@ -1788,6 +1788,10 @@ func (m *Model) updateLocals(folder string, fs []protocol.FileInfo) { func (m *Model) diskChangeDetected(folderCfg config.FolderConfiguration, files []protocol.FileInfo, typeOfEvent events.EventType) { for _, file := range files { + if file.IsInvalid() { + continue + } + objType := "file" action := "modified" @@ -1795,9 +1799,6 @@ func (m *Model) diskChangeDetected(folderCfg config.FolderConfiguration, files [ case file.IsDeleted(): action = "deleted" - case file.Invalid: - action = "ignored" // invalidated seems not very user friendly - // If our local vector is version 1 AND it is the only version // vector so far seen for this file then it is a new file. Else if // it is > 1 it's not new, and if it is 1 but another shortId @@ -1809,7 +1810,9 @@ func (m *Model) diskChangeDetected(folderCfg config.FolderConfiguration, files [ action = "added" } - if file.IsDirectory() { + if file.IsSymlink() { + objType = "symlink" + } else if file.IsDirectory() { objType = "dir" }