(m *testModel, folder string, fs []protocol.FileInfo)
| 275 | } |
| 276 | |
| 277 | func localIndexUpdate(m *testModel, folder string, fs []protocol.FileInfo) { |
| 278 | m.sdb.Update(folder, protocol.LocalDeviceID, fs) |
| 279 | seq, err := m.sdb.GetDeviceSequence(folder, protocol.LocalDeviceID) |
| 280 | if err != nil { |
| 281 | panic(err) |
| 282 | } |
| 283 | filenames := make([]string, len(fs)) |
| 284 | for i, file := range fs { |
| 285 | filenames[i] = file.Name |
| 286 | } |
| 287 | m.evLogger.Log(events.LocalIndexUpdated, map[string]interface{}{ |
| 288 | "folder": folder, |
| 289 | "items": len(fs), |
| 290 | "filenames": filenames, |
| 291 | "sequence": seq, |
| 292 | "version": seq, // legacy for sequence |
| 293 | }) |
| 294 | } |
| 295 | |
| 296 | func newDeviceConfiguration(defaultCfg config.DeviceConfiguration, id protocol.DeviceID, name string) config.DeviceConfiguration { |
| 297 | cfg := defaultCfg.Copy() |
no test coverage detected