Filenames added to audit log in the LocalIndexUpdated event (fixes #2549)

This commit is contained in:
Nate Morrison 2015-12-04 08:41:13 +01:00 committed by Jakob Borg
parent 739979a116
commit 86e8e5199e

View File

@ -1128,10 +1128,16 @@ func (m *Model) updateLocals(folder string, fs []protocol.FileInfo) {
m.fmut.RUnlock()
files.Update(protocol.LocalDeviceID, fs)
filenames := make([]string, len(fs))
for i, file := range fs {
filenames[i] = file.Name
}
events.Default.Log(events.LocalIndexUpdated, map[string]interface{}{
"folder": folder,
"items": len(fs),
"version": files.LocalVersion(protocol.LocalDeviceID),
"folder": folder,
"items": len(fs),
"filenames": filenames,
"version": files.LocalVersion(protocol.LocalDeviceID),
})
}