lib/model: Don't log ignored files (fixes #4832) (#4837)

This commit is contained in:
Audrius Butkevicius 2018-03-25 21:12:50 +01:00 committed by Simon Frei
parent a557d62c4a
commit a5e40563de

View File

@ -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"
}